diff options
Diffstat (limited to 'c/util.h')
-rw-r--r-- | c/util.h | 11 |
1 files changed, 2 insertions, 9 deletions
@@ -13,13 +13,6 @@ #define CONCAT(a, b) CONCAT_IMPL(a, b) #define _ CONCAT(unused_, __LINE__) -#define SET_TERMINATE \ - std::set_terminate([]() noexcept \ - { \ - EBMessageBox(What(), L"Fatal Error", MB_ICONERROR); \ - _Exit(1); \ - }) - /* Scope guard. */ template <typename F> struct Finally @@ -98,12 +91,12 @@ struct UniqueOk T v; UniqueOk(Unique<T, F>&& u) : v(std::move(u.v)) { - assert(u.ok, "UniqueOk may not be constructed from non-ok Unique"); + assert(u.ok); u.ok = false; } UniqueOk& operator =(Unique<T, F>&& u) { - assert(u.ok, "UniqueOk may not be constructed from non-ok Unique"); + assert(u.ok); F(v); v = std::move(u.v); u.ok = false; |