1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-01 14:29:51 +00:00

Merge pull request #886 from TomHarte/AppleIIgsWarnings

Resolves GCC warnings from dangling Apple IIgs work.
This commit is contained in:
Thomas Harte 2021-03-21 22:40:56 -04:00 committed by GitHub
commit fcba0cc3d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -200,7 +200,7 @@ template <typename Machine> class AuxiliaryMemorySwitches {
} }
/// @returns @c true if the alternative zero page should be used; @c false otherwise. /// @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; return switches_.alternative_zero_page;
} }

View File

@ -107,8 +107,8 @@ class MemManagerChecker {
return true; return true;
} }
bool has_seen_valid_memory_ = false; // bool has_seen_valid_memory_ = false;
bool should_validate_ = false; // bool should_validate_ = false;
public: public:
bool validate_memory_manager(const Apple::IIgs::MemoryMap &memory, bool print) { bool validate_memory_manager(const Apple::IIgs::MemoryMap &memory, bool print) {

View File

@ -35,7 +35,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 = [&next_region, this]() -> uint8_t {
assert(next_region != regions.size()); assert(next_region != this->regions.size());
return next_region++; return next_region++;
}; };
auto set_region = [this](uint8_t bank, uint16_t start, uint16_t end, uint8_t region) { auto set_region = [this](uint8_t bank, uint16_t start, uint16_t end, uint8_t region) {
@ -49,7 +49,7 @@ class MemoryMap {
++target; ++target;
} }
}; };
auto set_regions = [this, set_region, region](uint8_t bank, std::initializer_list<uint16_t> addresses, std::vector<uint8_t> allocated_regions = {}) { auto set_regions = [set_region, region](uint8_t bank, std::initializer_list<uint16_t> addresses, std::vector<uint8_t> allocated_regions = {}) {
uint16_t previous = 0x0000; uint16_t previous = 0x0000;
auto next_region = allocated_regions.begin(); auto next_region = allocated_regions.begin();
for(uint16_t address: addresses) { for(uint16_t address: addresses) {