From 964d2d4fa4d32bd3317f4ba50e1c077a51b2a35a Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 3 Jul 2021 00:00:00 -0400 Subject: [PATCH] Be consistent in expression of logic. --- Machines/Enterprise/Dave.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Machines/Enterprise/Dave.cpp b/Machines/Enterprise/Dave.cpp index 511275436..08450ff28 100644 --- a/Machines/Enterprise/Dave.cpp +++ b/Machines/Enterprise/Dave.cpp @@ -290,12 +290,12 @@ Cycles TimedInterruptSource::get_next_sequence_point() const { switch(rate_) { case InterruptRate::OnekHz: case InterruptRate::FiftyHz: - result = std::min(result, programmable_offset_ + (!programmable_level_)*programmble_reload(rate_)); + result = std::min(result, programmable_offset_ + (!programmable_level_) * programmble_reload(rate_)); break; case InterruptRate::ToneGenerator0: case InterruptRate::ToneGenerator1: { const auto &channel = channels_[int(rate_) - int(InterruptRate::ToneGenerator0)]; - const int cycles_until_interrupt = channel.value + 1 + (channel.level ? 0 : channel.reload + 1); + const int cycles_until_interrupt = channel.value + 1 + (!channel.level) * (channel.reload + 1); result = std::min(result, cycles_until_interrupt); } break; }