summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2018-05-01 04:21:20 +1000
committer Vas Crabb <vas@vastheman.com>2018-05-01 04:21:20 +1000
commit6487cd2e957f65a9a83162d20ea0479cd2e699f9 (patch)
treeaa909901d936c5da7905eef5d70bb87d3f379dc5 /src/emu
parent2047471723e83ba31b6a3f14150438556659b4ee (diff)
Get rid of the assert replacement. It prevents you from using assert in
a destructor for a literal type due to the implicit nothrow. It's just not worth the trouble it's causing. In file included from ../../../../../src/emu/emu.h:83: ../../../../../src/emu/mconfig.h:70:5: error: '~token' has a non-throwing exception specification but can still throw [-Werror,-Wexceptions] assert(m_device == m_host.m_current_device); ^ In file included from ../../../../../src/emu/emu.h:29: ../../../../../src/emu/emucore.h:230:48: note: expanded from macro 'assert' #define assert(x) do { if (!(x)) throw emu_fatalerror("assert: %s:%d: %s", __FILE__, __LINE__, #x); } while (0) ^ In file included from ../../../../../src/emu/emu.h:83: ../../../../../src/emu/mconfig.h:66:3: note: destructor has a implicit non-throwing exception specification ~token() ^ 1 error generated.
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/emucore.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/emu/emucore.h b/src/emu/emucore.h
index c663909e675..9e55b7d48d1 100644
--- a/src/emu/emucore.h
+++ b/src/emu/emucore.h
@@ -220,17 +220,13 @@ inline TYPE &operator|=(TYPE &a, TYPE b) { return a = a | b; }
// standard assertion macros
-#undef assert
#undef assert_always
#if defined(MAME_DEBUG_FAST)
-#define assert(x) do { } while (0)
#define assert_always(x, msg) do { if (!(x)) throw emu_fatalerror("Fatal error: %s\nCaused by assert: %s:%d: %s", msg, __FILE__, __LINE__, #x); } while (0)
#elif defined(MAME_DEBUG)
-#define assert(x) do { if (!(x)) throw emu_fatalerror("assert: %s:%d: %s", __FILE__, __LINE__, #x); } while (0)
#define assert_always(x, msg) do { if (!(x)) throw emu_fatalerror("Fatal error: %s\nCaused by assert: %s:%d: %s", msg, __FILE__, __LINE__, #x); } while (0)
#else
-#define assert(x) do { } while (0)
#define assert_always(x, msg) do { if (!(x)) throw emu_fatalerror("Fatal error: %s (%s:%d)", msg, __FILE__, __LINE__); } while (0)
#endif