Skip to content

Instantly share code, notes, and snippets.

@mosra
Created July 17, 2020 14:30
Show Gist options
  • Save mosra/566aedd25eadd07927d4f7e385aac931 to your computer and use it in GitHub Desktop.
Save mosra/566aedd25eadd07927d4f7e385aac931 to your computer and use it in GitHub Desktop.
diff --git a/src/Corrade/Utility/Assert.h b/src/Corrade/Utility/Assert.h
index a6a0cf17..7823034f 100644
--- a/src/Corrade/Utility/Assert.h
+++ b/src/Corrade/Utility/Assert.h
@@ -174,7 +174,7 @@ You can override this implementation by placing your own
#define CORRADE_ASSERT(condition, message, returnValue) \
do { \
if(!(condition)) { \
- Corrade::Utility::Error{Corrade::Utility::Error::defaultOutput()} << message; \
+ Corrade::Utility::Error{} << message; \
std::abort(); \
return returnValue; \
} \
@@ -232,7 +232,7 @@ You can override this implementation by placing your own
#else
#define CORRADE_CONSTEXPR_ASSERT(condition, message) \
static_cast<void>((condition) ? 0 : ([&]() { \
- Corrade::Utility::Error{Corrade::Utility::Error::defaultOutput()} << message; \
+ Corrade::Utility::Error{} << message; \
std::abort(); \
}(), 0))
#endif
@@ -277,7 +277,7 @@ You can override this implementation by placing your own
#define CORRADE_ASSERT_OUTPUT(call, message, returnValue) \
do { \
if(!(call)) { \
- Corrade::Utility::Error{Corrade::Utility::Error::defaultOutput()} << message; \
+ Corrade::Utility::Error{} << message; \
std::abort(); \
return returnValue; \
} \
@@ -331,7 +331,7 @@ You can override this implementation by placing your own
#else
#define CORRADE_ASSERT_UNREACHABLE(message, returnValue) \
do { \
- Corrade::Utility::Error{Corrade::Utility::Error::defaultOutput()} << message; \
+ Corrade::Utility::Error{} << message; \
std::abort(); \
} while(false)
#endif
@@ -390,7 +390,7 @@ You can override this implementation by placing your own
#define CORRADE_INTERNAL_ASSERT(condition) \
do { \
if(!(condition)) { \
- Corrade::Utility::Error{Corrade::Utility::Error::defaultOutput()} << "Assertion " #condition " failed at " __FILE__ ":" CORRADE_LINE_STRING; \
+ Corrade::Utility::Error{} << "Assertion " #condition " failed at " __FILE__ ":" CORRADE_LINE_STRING; \
std::abort(); \
} \
} while(false)
@@ -429,7 +429,7 @@ You can override this implementation by placing your own
#else
#define CORRADE_INTERNAL_CONSTEXPR_ASSERT(condition) \
static_cast<void>((condition) ? 0 : ([&]() { \
- Corrade::Utility::Error{Corrade::Utility::Error::defaultOutput()} << "Assertion " #condition " failed at " __FILE__ ":" CORRADE_LINE_STRING; \
+ Corrade::Utility::Error{} << "Assertion " #condition " failed at " __FILE__ ":" CORRADE_LINE_STRING; \
std::abort(); \
}(), 0))
#endif
@@ -461,7 +461,7 @@ You can override this implementation by placing your own
#define CORRADE_INTERNAL_ASSERT_OUTPUT(call) \
do { \
if(!(call)) { \
- Corrade::Utility::Error{Corrade::Utility::Error::defaultOutput()} << "Assertion " #call " failed at " __FILE__ ":" CORRADE_LINE_STRING; \
+ Corrade::Utility::Error{} << "Assertion " #call " failed at " __FILE__ ":" CORRADE_LINE_STRING; \
std::abort(); \
} \
} while(false)
@@ -505,7 +505,7 @@ You can override this implementation by placing your own
#else
#define CORRADE_INTERNAL_ASSERT_UNREACHABLE() \
do { \
- Corrade::Utility::Error{Corrade::Utility::Error::defaultOutput()} << "Reached unreachable code at " __FILE__ ":" CORRADE_LINE_STRING; \
+ Corrade::Utility::Error{} << "Reached unreachable code at " __FILE__ ":" CORRADE_LINE_STRING; \
std::abort(); \
} while(false)
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment