Changing FASTDEBUG to be assert-free is too big a change to push through without public discussion

This commit is contained in:
Vas Crabb 2015-03-20 23:56:45 +11:00
parent 4282a7c9f2
commit ca94bb7905
2 changed files with 3 additions and 4 deletions

View File

@ -67,10 +67,7 @@ private:
#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)
#ifdef 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

View File

@ -451,7 +451,9 @@ void device_scheduler::timeslice()
attoseconds_t delta = target.attoseconds - exec->m_localtime.attoseconds;
if (delta < 0 && target.seconds > exec->m_localtime.seconds)
delta += ATTOSECONDS_PER_SECOND;
#ifndef MAME_DEBUG_FAST
assert(delta == (target - exec->m_localtime).as_attoseconds());
#endif
// if we have enough for at least 1 cycle, do the math
if (delta >= exec->m_attoseconds_per_cycle)