From e59499b1273a965a707534d0cc07a02e6a1821f3 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Tue, 11 Feb 2020 00:07:37 -0600 Subject: [PATCH] [ox/std] Fix oxIgnoreError to not completely ignore the statement it encompases --- deps/ox/src/ox/std/error.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deps/ox/src/ox/std/error.hpp b/deps/ox/src/ox/std/error.hpp index 6f157491..9ab7a6fa 100644 --- a/deps/ox/src/ox/std/error.hpp +++ b/deps/ox/src/ox/std/error.hpp @@ -18,10 +18,6 @@ #define OxError(x) static_cast(x) #endif -#define oxIgnoreError(x) -#define oxReturnError(x) if (const auto _ox_error = ox::error::toError(x)) return _ox_error -#define oxThrowError(x) if (const auto _ox_error = ox::error::toError(x)) throw _ox_error - namespace ox { struct BaseError { @@ -95,3 +91,7 @@ template } +inline void oxIgnoreError(ox::Error) {} +#define oxReturnError(x) if (const auto _ox_error = ox::error::toError(x)) return _ox_error +#define oxThrowError(x) if (const auto _ox_error = ox::error::toError(x)) throw _ox_error +