From 0f9ab53ea0184922fa311c4937ff6f7c3de10ae8 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 21 Mar 2021 22:25:14 -0400 Subject: [PATCH] Resolves GCC warnings from dangling Apple IIgs work. --- Machines/Apple/AppleII/AuxiliaryMemorySwitches.hpp | 2 +- Machines/Apple/AppleIIgs/AppleIIgs.cpp | 4 ++-- Machines/Apple/AppleIIgs/MemoryMap.hpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Machines/Apple/AppleII/AuxiliaryMemorySwitches.hpp b/Machines/Apple/AppleII/AuxiliaryMemorySwitches.hpp index f4ae901d8..9dc5b56fb 100644 --- a/Machines/Apple/AppleII/AuxiliaryMemorySwitches.hpp +++ b/Machines/Apple/AppleII/AuxiliaryMemorySwitches.hpp @@ -200,7 +200,7 @@ template class AuxiliaryMemorySwitches { } /// @returns @c true if the alternative zero page should be used; @c false otherwise. - const ZeroState zero_state() const { + ZeroState zero_state() const { return switches_.alternative_zero_page; } diff --git a/Machines/Apple/AppleIIgs/AppleIIgs.cpp b/Machines/Apple/AppleIIgs/AppleIIgs.cpp index 831104b65..7c0d8ccc5 100644 --- a/Machines/Apple/AppleIIgs/AppleIIgs.cpp +++ b/Machines/Apple/AppleIIgs/AppleIIgs.cpp @@ -107,8 +107,8 @@ class MemManagerChecker { return true; } - bool has_seen_valid_memory_ = false; - bool should_validate_ = false; +// bool has_seen_valid_memory_ = false; +// bool should_validate_ = false; public: bool validate_memory_manager(const Apple::IIgs::MemoryMap &memory, bool print) { diff --git a/Machines/Apple/AppleIIgs/MemoryMap.hpp b/Machines/Apple/AppleIIgs/MemoryMap.hpp index afa8fbb72..af0d9d5cd 100644 --- a/Machines/Apple/AppleIIgs/MemoryMap.hpp +++ b/Machines/Apple/AppleIIgs/MemoryMap.hpp @@ -35,7 +35,7 @@ class MemoryMap { // Establish bank mapping. uint8_t next_region = 0; auto region = [&next_region, this]() -> uint8_t { - assert(next_region != regions.size()); + assert(next_region != this->regions.size()); return next_region++; }; auto set_region = [this](uint8_t bank, uint16_t start, uint16_t end, uint8_t region) { @@ -49,7 +49,7 @@ class MemoryMap { ++target; } }; - auto set_regions = [this, set_region, region](uint8_t bank, std::initializer_list addresses, std::vector allocated_regions = {}) { + auto set_regions = [set_region, region](uint8_t bank, std::initializer_list addresses, std::vector allocated_regions = {}) { uint16_t previous = 0x0000; auto next_region = allocated_regions.begin(); for(uint16_t address: addresses) {