From 030f49db837a2f11e006ab103decf80c1704da98 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Mon, 22 Jan 2024 21:33:39 -0500 Subject: [PATCH] Eliminate macro. --- Analyser/Static/Acorn/Tape.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Analyser/Static/Acorn/Tape.cpp b/Analyser/Static/Acorn/Tape.cpp index b162e2a56..8badda594 100644 --- a/Analyser/Static/Acorn/Tape.cpp +++ b/Analyser/Static/Acorn/Tape.cpp @@ -19,8 +19,10 @@ static std::unique_ptr GetNextChunk(const std::shared_ptr(); int shift_register = 0; -// TODO: move this into the parser -#define shift() shift_register = (shift_register >> 1) | (parser.get_next_bit(tape) << 9) + // TODO: move this into the parser + const auto shift = [&] { + shift_register = (shift_register >> 1) | (parser.get_next_bit(tape) << 9); + }; // find next area of high tone while(!tape->is_at_end() && (shift_register != 0x3ff)) { @@ -32,8 +34,6 @@ static std::unique_ptr GetNextChunk(const std::shared_ptr