1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-01-29 20:31:46 +00:00

Remove much unused storage; add virtual destructor.

This commit is contained in:
Thomas Harte 2023-12-27 11:14:08 -05:00
parent eca0984739
commit 3793fbd978
6 changed files with 16 additions and 16 deletions

View File

@ -24,6 +24,8 @@ namespace Activity {
*/ */
class Observer { class Observer {
public: public:
virtual ~Observer() {}
/// Provides hints as to the sort of information presented on an LED. /// Provides hints as to the sort of information presented on an LED.
enum LEDPresentation: uint8_t { enum LEDPresentation: uint8_t {
/// This LED informs the user of some sort of persistent state, e.g. scroll lock. /// This LED informs the user of some sort of persistent state, e.g. scroll lock.

View File

@ -322,8 +322,6 @@ struct MOS6526Storage {
static constexpr int TestInputNow = 1 << 8; static constexpr int TestInputNow = 1 << 8;
static constexpr int PendingClearMask = ~(ReloadNow | OneShotNow | ApplyClockNow); static constexpr int PendingClearMask = ~(ReloadNow | OneShotNow | ApplyClockNow);
bool active_ = false;
} counter_[2]; } counter_[2];
static constexpr int InterruptInOne = 1 << 0; static constexpr int InterruptInOne = 1 << 0;

View File

@ -213,7 +213,7 @@ struct Line: public Command {
} }
private: private:
int position_, numerator_, denominator_, duration_; int position_, numerator_, denominator_;
}; };
// MARK: - Single pixel manipulation. // MARK: - Single pixel manipulation.

View File

@ -225,9 +225,9 @@ class Chipset: private ClockingHint::Observer {
uint16_t get_status(); uint16_t get_status();
private: private:
uint16_t value = 0, reload = 0; // uint16_t value = 0, reload = 0;
uint16_t shift = 0, receive_shift = 0; // uint16_t shift = 0, receive_shift = 0;
uint16_t status; // uint16_t status;
} serial_; } serial_;
// MARK: - Pixel output. // MARK: - Pixel output.

View File

@ -96,21 +96,21 @@ class Keyboard {
} }
private: private:
enum class ShiftState { // enum class ShiftState {
Shifting, // Shifting,
AwaitingHandshake, // AwaitingHandshake,
Idle, // Idle,
} shift_state_ = ShiftState::Idle; // } shift_state_ = ShiftState::Idle;
enum class State { enum class State {
Startup, Startup,
} state_ = State::Startup; } state_ = State::Startup;
int bit_phase_ = 0; // int bit_phase_ = 0;
uint32_t shift_sequence_ = 0; // uint32_t shift_sequence_ = 0;
int bits_remaining_ = 0; // int bits_remaining_ = 0;
uint8_t lines_ = 0; // uint8_t lines_ = 0;
Serial::Line<true> &output_; Serial::Line<true> &output_;
std::array<bool, 128> pressed_{}; std::array<bool, 128> pressed_{};

View File

@ -38,7 +38,7 @@ class MemoryMap {
// Establish bank mapping. // Establish bank mapping.
uint8_t next_region = 0; uint8_t next_region = 0;
auto region = [&next_region, this]() -> uint8_t { auto region = [&]() -> uint8_t {
assert(next_region != this->regions.size()); assert(next_region != this->regions.size());
return next_region++; return next_region++;
}; };