[ox] Remove OxError
This commit is contained in:
7
deps/ox/src/ox/std/error.hpp
vendored
7
deps/ox/src/ox/std/error.hpp
vendored
@ -30,7 +30,6 @@ class exception {
|
||||
#include "typetraits.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
#define OxError(...) ox::Error(__FILE__, __LINE__, __VA_ARGS__)
|
||||
#define OxException(...) ox::Exception(__FILE__, __LINE__, __VA_ARGS__)
|
||||
|
||||
namespace ox {
|
||||
@ -165,10 +164,10 @@ struct [[nodiscard]] Result {
|
||||
constexpr Result(const Error &error) noexcept: value(), error(error) {
|
||||
}
|
||||
|
||||
constexpr Result(const type &value, const Error &error = OxError(0)) noexcept: value(value), error(error) {
|
||||
constexpr Result(const type &value, const Error &error = ox::Error(0)) noexcept: value(value), error(error) {
|
||||
}
|
||||
|
||||
constexpr Result(type &&value, const Error &error = OxError(0)) noexcept: value(std::move(value)), error(error) {
|
||||
constexpr Result(type &&value, const Error &error = ox::Error(0)) noexcept: value(std::move(value)), error(error) {
|
||||
}
|
||||
|
||||
constexpr ~Result() noexcept = default;
|
||||
@ -356,7 +355,7 @@ constexpr Error toError(const Result<T> &r) noexcept {
|
||||
constexpr void primitiveAssert(const char *file, int line, bool pass, const char *msg) noexcept {
|
||||
if constexpr(ox::defines::Debug) {
|
||||
if (!pass) [[unlikely]] {
|
||||
panic(file, line, msg, OxError(1));
|
||||
panic(file, line, msg, ox::Error(1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user