aboutsummaryrefslogtreecommitdiff
path: root/c/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'c/util.h')
-rw-r--r--c/util.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/c/util.h b/c/util.h
index 668d040..561e232 100644
--- a/c/util.h
+++ b/c/util.h
@@ -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;