From 3793fbd978f4b1a353831fdadae0a7c3b803b5b7 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Wed, 27 Dec 2023 11:14:08 -0500 Subject: [PATCH] Remove much unused storage; add virtual destructor. --- Activity/Observer.hpp | 2 ++ Components/6526/Implementation/6526Storage.hpp | 2 -- .../9918/Implementation/YamahaCommands.hpp | 2 +- Machines/Amiga/Chipset.hpp | 6 +++--- Machines/Amiga/Keyboard.hpp | 18 +++++++++--------- Machines/Apple/AppleIIgs/MemoryMap.hpp | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Activity/Observer.hpp b/Activity/Observer.hpp index 4233af7d7..9ac8ae4df 100644 --- a/Activity/Observer.hpp +++ b/Activity/Observer.hpp @@ -24,6 +24,8 @@ namespace Activity { */ class Observer { public: + virtual ~Observer() {} + /// Provides hints as to the sort of information presented on an LED. enum LEDPresentation: uint8_t { /// This LED informs the user of some sort of persistent state, e.g. scroll lock. diff --git a/Components/6526/Implementation/6526Storage.hpp b/Components/6526/Implementation/6526Storage.hpp index 99978f67c..9eb2c7ca5 100644 --- a/Components/6526/Implementation/6526Storage.hpp +++ b/Components/6526/Implementation/6526Storage.hpp @@ -322,8 +322,6 @@ struct MOS6526Storage { static constexpr int TestInputNow = 1 << 8; static constexpr int PendingClearMask = ~(ReloadNow | OneShotNow | ApplyClockNow); - - bool active_ = false; } counter_[2]; static constexpr int InterruptInOne = 1 << 0; diff --git a/Components/9918/Implementation/YamahaCommands.hpp b/Components/9918/Implementation/YamahaCommands.hpp index 72cbd08d3..9895e28cb 100644 --- a/Components/9918/Implementation/YamahaCommands.hpp +++ b/Components/9918/Implementation/YamahaCommands.hpp @@ -213,7 +213,7 @@ struct Line: public Command { } private: - int position_, numerator_, denominator_, duration_; + int position_, numerator_, denominator_; }; // MARK: - Single pixel manipulation. diff --git a/Machines/Amiga/Chipset.hpp b/Machines/Amiga/Chipset.hpp index 5f1a2c3dd..02146f2fd 100644 --- a/Machines/Amiga/Chipset.hpp +++ b/Machines/Amiga/Chipset.hpp @@ -225,9 +225,9 @@ class Chipset: private ClockingHint::Observer { uint16_t get_status(); private: - uint16_t value = 0, reload = 0; - uint16_t shift = 0, receive_shift = 0; - uint16_t status; +// uint16_t value = 0, reload = 0; +// uint16_t shift = 0, receive_shift = 0; +// uint16_t status; } serial_; // MARK: - Pixel output. diff --git a/Machines/Amiga/Keyboard.hpp b/Machines/Amiga/Keyboard.hpp index 31818edd8..f15c3b1bd 100644 --- a/Machines/Amiga/Keyboard.hpp +++ b/Machines/Amiga/Keyboard.hpp @@ -96,21 +96,21 @@ class Keyboard { } private: - enum class ShiftState { - Shifting, - AwaitingHandshake, - Idle, - } shift_state_ = ShiftState::Idle; +// enum class ShiftState { +// Shifting, +// AwaitingHandshake, +// Idle, +// } shift_state_ = ShiftState::Idle; enum class State { Startup, } state_ = State::Startup; - int bit_phase_ = 0; - uint32_t shift_sequence_ = 0; - int bits_remaining_ = 0; +// int bit_phase_ = 0; +// uint32_t shift_sequence_ = 0; +// int bits_remaining_ = 0; - uint8_t lines_ = 0; +// uint8_t lines_ = 0; Serial::Line &output_; std::array pressed_{}; diff --git a/Machines/Apple/AppleIIgs/MemoryMap.hpp b/Machines/Apple/AppleIIgs/MemoryMap.hpp index 0800fca04..20f3e4d3a 100644 --- a/Machines/Apple/AppleIIgs/MemoryMap.hpp +++ b/Machines/Apple/AppleIIgs/MemoryMap.hpp @@ -38,7 +38,7 @@ class MemoryMap { // Establish bank mapping. uint8_t next_region = 0; - auto region = [&next_region, this]() -> uint8_t { + auto region = [&]() -> uint8_t { assert(next_region != this->regions.size()); return next_region++; };