[ox/std] Make oxThrowError do a move to satisfy clang-tidy
This commit is contained in:
parent
196c7844ea
commit
ae62f89fe8
3
deps/ox/src/ox/std/error.hpp
vendored
3
deps/ox/src/ox/std/error.hpp
vendored
@ -19,6 +19,7 @@ namespace ox {
|
||||
|
||||
using ErrorCode = uint16_t;
|
||||
|
||||
|
||||
struct [[nodiscard]] Error {
|
||||
const char *msg = nullptr;
|
||||
const char *file = nullptr;
|
||||
@ -127,7 +128,7 @@ constexpr void oxIgnoreError(ox::Error) noexcept {}
|
||||
#define oxThrowError(x) if (const auto _ox_error = ox::detail::toError(x)) [[unlikely]] throw _ox_error
|
||||
#else
|
||||
#define oxReturnError(err) if (const auto _ox_error = ox::detail::toError(err)) return _ox_error
|
||||
#define oxThrowError(err) if (const auto _ox_error = ox::detail::toError(err)) throw _ox_error
|
||||
#define oxThrowError(err) if (const auto _ox_error = ox::detail::toError(err)) throw ox::move(_ox_error)
|
||||
#endif
|
||||
#define oxConcatImpl(a, b) a##b
|
||||
#define oxConcat(a, b) oxConcatImpl(a, b)
|
||||
|
Loading…
Reference in New Issue
Block a user