From de800fe9f1f618fdeba9b8f4f84d75ac858f671c Mon Sep 17 00:00:00 2001 From: Adrian Conlon Date: Sun, 3 May 2020 20:29:18 +0100 Subject: [PATCH] Modify virtual default destructor specification to better match core guidelines. Signed-off-by: Adrian Conlon --- inc/Chip.h | 2 +- inc/ClockedChip.h | 2 +- inc/IntelProcessor.h | 8 ++++---- inc/LittleEndianProcessor.h | 2 +- inc/Processor.h | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/inc/Chip.h b/inc/Chip.h index 2be0b7a..4f178c6 100644 --- a/inc/Chip.h +++ b/inc/Chip.h @@ -66,7 +66,7 @@ namespace EightBit { [[nodiscard]] static constexpr auto promoteNibble(const int value) { return value << 4; } [[nodiscard]] static constexpr auto demoteNibble(const int value) { return highNibble(value); } - virtual ~Chip() = default; + ~Chip() = default; protected: Chip() = default; diff --git a/inc/ClockedChip.h b/inc/ClockedChip.h index d2f24f3..c08e38d 100644 --- a/inc/ClockedChip.h +++ b/inc/ClockedChip.h @@ -7,7 +7,7 @@ namespace EightBit { class ClockedChip : public Chip { public: - virtual ~ClockedChip() = default; + ~ClockedChip() = default; Signal Ticked; diff --git a/inc/IntelProcessor.h b/inc/IntelProcessor.h index 300591e..5be5e6f 100644 --- a/inc/IntelProcessor.h +++ b/inc/IntelProcessor.h @@ -34,10 +34,10 @@ namespace EightBit { } }; - virtual ~IntelProcessor() = default; + ~IntelProcessor() = default; [[nodiscard]] const auto& getDecodedOpcode(const size_t i) const noexcept { - return m_decodedOpcodes.at(i); + return m_decodedOpcodes[i]; } [[nodiscard]] auto& MEMPTR() noexcept { return m_memptr; } @@ -111,13 +111,13 @@ namespace EightBit { [[nodiscard]] static auto calculateHalfCarryAdd(const uint8_t before, const uint8_t value, const int calculation) noexcept { static std::array halfCarryTableAdd = { { 0, 0, 1, 0, 1, 0, 1, 1} }; const auto index = buildHalfCarryIndex(before, value, calculation); - return halfCarryTableAdd.at(index & Mask3); + return halfCarryTableAdd[index & Mask3]; } [[nodiscard]] static auto calculateHalfCarrySub(const uint8_t before, const uint8_t value, const int calculation) noexcept { std::array halfCarryTableSub = { { 0, 1, 1, 1, 0, 0, 0, 1 } }; const auto index = buildHalfCarryIndex(before, value, calculation); - return halfCarryTableSub.at(index & Mask3); + return halfCarryTableSub[index & Mask3]; } void handleRESET() override; diff --git a/inc/LittleEndianProcessor.h b/inc/LittleEndianProcessor.h index 15e8d0e..73d432f 100644 --- a/inc/LittleEndianProcessor.h +++ b/inc/LittleEndianProcessor.h @@ -8,7 +8,7 @@ namespace EightBit { class LittleEndianProcessor : public Processor { public: - virtual ~LittleEndianProcessor() = default; + ~LittleEndianProcessor() = default; register16_t peekWord(register16_t address) final; void pokeWord(register16_t address, register16_t value) final; diff --git a/inc/Processor.h b/inc/Processor.h index 18890f6..5026c52 100644 --- a/inc/Processor.h +++ b/inc/Processor.h @@ -15,7 +15,7 @@ namespace EightBit { // x: sign extend this b-bit number to r [[nodiscard]] static int8_t signExtend(int b, uint8_t x) noexcept; - virtual ~Processor() = default; + ~Processor() = default; [[nodiscard]] auto& PC() noexcept { return m_pc; }