From fb352a8d407f00083440731928ab87288fe2a93c Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Mon, 8 Jul 2019 18:00:37 -0400 Subject: [PATCH] Ensures `assert` is completely excluded if NDEBUG. --- Processors/68000/Implementation/68000Implementation.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Processors/68000/Implementation/68000Implementation.hpp b/Processors/68000/Implementation/68000Implementation.hpp index 75b7e3258..db25a1ee6 100644 --- a/Processors/68000/Implementation/68000Implementation.hpp +++ b/Processors/68000/Implementation/68000Implementation.hpp @@ -51,9 +51,14 @@ // Sets the length of the next microcycle; if this is a debug build, also confirms // that the microcycle being adjusted is the one that it's permissible to adjust. +#ifdef NDEBUG +#define set_next_microcycle_length(x) \ + bus_program->microcycle.length = x +#else #define set_next_microcycle_length(x) \ assert(bus_program->microcycle.is_resizeable); \ bus_program->microcycle.length = x +#endif template void Processor::run_for(HalfCycles duration) { const HalfCycles remaining_duration = duration + half_cycles_left_to_run_;