1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-06-29 15:29:36 +00:00

Ensures assert is completely excluded if NDEBUG.

This commit is contained in:
Thomas Harte 2019-07-08 18:00:37 -04:00
parent ea7899f47d
commit fb352a8d40

View File

@ -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 <class T, bool dtack_is_implicit, bool signal_will_perform> void Processor<T, dtack_is_implicit, signal_will_perform>::run_for(HalfCycles duration) {
const HalfCycles remaining_duration = duration + half_cycles_left_to_run_;