diff --git a/inc/BigEndianProcessor.h b/inc/BigEndianProcessor.h index 9d3faa8..4b76563 100644 --- a/inc/BigEndianProcessor.h +++ b/inc/BigEndianProcessor.h @@ -14,7 +14,7 @@ namespace EightBit { void pokeWord(register16_t address, register16_t value) noexcept final; protected: - BigEndianProcessor(Bus& memory); + BigEndianProcessor(Bus& memory) noexcept; [[nodiscard]] register16_t getWord() noexcept override; void setWord(register16_t value) noexcept override; diff --git a/inc/Bus.h b/inc/Bus.h index cdec80d..3012744 100644 --- a/inc/Bus.h +++ b/inc/Bus.h @@ -12,7 +12,7 @@ namespace EightBit { class Bus : public Mapper { public: - virtual ~Bus() {}; + virtual ~Bus() noexcept {}; Signal WritingByte; Signal WrittenByte; diff --git a/inc/Chip.h b/inc/Chip.h index a361ebe..f08c842 100644 --- a/inc/Chip.h +++ b/inc/Chip.h @@ -66,8 +66,6 @@ namespace EightBit { [[nodiscard]] static constexpr auto promoteNibble(const int value) noexcept { return value << 4; } [[nodiscard]] static constexpr auto demoteNibble(const int value) noexcept { return highNibble(value); } - virtual ~Chip() {} - Chip(const Chip& rhs) : Device(rhs) {} diff --git a/inc/ClockedChip.h b/inc/ClockedChip.h index c5c5693..66bd89a 100644 --- a/inc/ClockedChip.h +++ b/inc/ClockedChip.h @@ -7,10 +7,8 @@ namespace EightBit { class ClockedChip : public Chip { public: - virtual ~ClockedChip() noexcept {}; - - ClockedChip(const ClockedChip& rhs); - bool operator==(const ClockedChip& rhs) const; + ClockedChip(const ClockedChip& rhs) noexcept; + bool operator==(const ClockedChip& rhs) const noexcept; Signal Ticked; diff --git a/inc/Device.h b/inc/Device.h index e1d63cd..1647d0f 100644 --- a/inc/Device.h +++ b/inc/Device.h @@ -108,8 +108,8 @@ namespace EightBit { virtual ~Device() noexcept {}; - Device(const Device& rhs); - bool operator==(const Device& rhs) const; + Device(const Device& rhs) noexcept; + bool operator==(const Device& rhs) const noexcept; [[nodiscard]] constexpr bool powered() const noexcept { return raised(POWER()); } diff --git a/inc/IntelProcessor.h b/inc/IntelProcessor.h index 0498beb..1ca3a32 100644 --- a/inc/IntelProcessor.h +++ b/inc/IntelProcessor.h @@ -44,8 +44,6 @@ namespace EightBit { } }; - virtual ~IntelProcessor() {}; - IntelProcessor(const IntelProcessor& rhs); bool operator==(const IntelProcessor& rhs) const; diff --git a/inc/LittleEndianProcessor.h b/inc/LittleEndianProcessor.h index 1ba3c63..7c5c63e 100644 --- a/inc/LittleEndianProcessor.h +++ b/inc/LittleEndianProcessor.h @@ -8,7 +8,6 @@ namespace EightBit { class LittleEndianProcessor : public Processor { public: - virtual ~LittleEndianProcessor() {}; LittleEndianProcessor(const LittleEndianProcessor& rhs); [[nodiscard]] register16_t peekWord(register16_t address) noexcept final; diff --git a/inc/Mapper.h b/inc/Mapper.h index 83e71b0..d79259d 100644 --- a/inc/Mapper.h +++ b/inc/Mapper.h @@ -7,8 +7,6 @@ namespace EightBit { class Mapper { public: - virtual ~Mapper() {}; - [[nodiscard]] virtual MemoryMapping mapping(uint16_t address) noexcept = 0; }; } diff --git a/inc/Memory.h b/inc/Memory.h index e8076f3..6a9aed2 100644 --- a/inc/Memory.h +++ b/inc/Memory.h @@ -14,8 +14,6 @@ namespace EightBit { // *) Possibly 'reference'able (Very likely if you've exposed 'poke') class Memory { public: - virtual ~Memory() {}; - [[nodiscard]] virtual uint16_t size() const noexcept = 0; [[nodiscard]] virtual uint8_t peek(uint16_t address) const noexcept = 0; diff --git a/inc/Processor.h b/inc/Processor.h index 3901053..be7e620 100644 --- a/inc/Processor.h +++ b/inc/Processor.h @@ -21,8 +21,6 @@ namespace EightBit { return result; } - virtual ~Processor() noexcept {} - Processor(const Processor& rhs); bool operator==(const Processor& rhs) const; diff --git a/inc/UnusedMemory.h b/inc/UnusedMemory.h index cd60245..f843371 100644 --- a/inc/UnusedMemory.h +++ b/inc/UnusedMemory.h @@ -14,7 +14,6 @@ namespace EightBit { class UnusedMemory final : public Memory { public: UnusedMemory(uint16_t size, uint8_t value) noexcept; - ~UnusedMemory() = default; [[nodiscard]] uint16_t size() const noexcept final; [[nodiscard]] uint8_t peek(uint16_t address) const noexcept final; diff --git a/src/BigEndianProcessor.cpp b/src/BigEndianProcessor.cpp index eeebb90..69c4fee 100644 --- a/src/BigEndianProcessor.cpp +++ b/src/BigEndianProcessor.cpp @@ -1,7 +1,7 @@ #include "stdafx.h" #include "../inc/BigEndianProcessor.h" -EightBit::BigEndianProcessor::BigEndianProcessor(Bus& memory) +EightBit::BigEndianProcessor::BigEndianProcessor(Bus& memory) noexcept : Processor(memory) {} EightBit::register16_t EightBit::BigEndianProcessor::getWord() noexcept { diff --git a/src/ClockedChip.cpp b/src/ClockedChip.cpp index bb34757..ea50b98 100644 --- a/src/ClockedChip.cpp +++ b/src/ClockedChip.cpp @@ -1,12 +1,12 @@ #include "stdafx.h" #include "../inc/ClockedChip.h" -EightBit::ClockedChip::ClockedChip(const ClockedChip& rhs) +EightBit::ClockedChip::ClockedChip(const ClockedChip& rhs) noexcept : Chip(rhs) { m_cycles = rhs.m_cycles; } -bool EightBit::ClockedChip::operator==(const EightBit::ClockedChip& rhs) const { +bool EightBit::ClockedChip::operator==(const EightBit::ClockedChip& rhs) const noexcept { return Device::operator==(rhs) && cycles() == rhs.cycles(); diff --git a/src/Device.cpp b/src/Device.cpp index ba791b2..4fdfd86 100644 --- a/src/Device.cpp +++ b/src/Device.cpp @@ -3,10 +3,10 @@ DEFINE_PIN_LEVEL_CHANGERS(POWER, Device); -EightBit::Device::Device(const Device& rhs) { +EightBit::Device::Device(const Device& rhs) noexcept { POWER() = rhs.POWER(); } -bool EightBit::Device::operator==(const EightBit::Device& rhs) const { +bool EightBit::Device::operator==(const EightBit::Device& rhs) const noexcept { return POWER() == rhs.POWER(); }