mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-09-07 23:54:50 +00:00
Tidy up some exception specifications.
This commit is contained in:
parent
1a5df4c8a7
commit
9a5f9ccd1a
@ -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;
|
||||
|
@ -12,7 +12,7 @@
|
||||
namespace EightBit {
|
||||
class Bus : public Mapper {
|
||||
public:
|
||||
virtual ~Bus() {};
|
||||
virtual ~Bus() noexcept {};
|
||||
|
||||
Signal<EventArgs> WritingByte;
|
||||
Signal<EventArgs> WrittenByte;
|
||||
|
@ -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) {}
|
||||
|
||||
|
@ -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<EventArgs> Ticked;
|
||||
|
||||
|
@ -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()); }
|
||||
|
||||
|
@ -44,8 +44,6 @@ namespace EightBit {
|
||||
}
|
||||
};
|
||||
|
||||
virtual ~IntelProcessor() {};
|
||||
|
||||
IntelProcessor(const IntelProcessor& rhs);
|
||||
bool operator==(const IntelProcessor& rhs) const;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -7,8 +7,6 @@
|
||||
namespace EightBit {
|
||||
class Mapper {
|
||||
public:
|
||||
virtual ~Mapper() {};
|
||||
|
||||
[[nodiscard]] virtual MemoryMapping mapping(uint16_t address) noexcept = 0;
|
||||
};
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
@ -21,8 +21,6 @@ namespace EightBit {
|
||||
return result;
|
||||
}
|
||||
|
||||
virtual ~Processor() noexcept {}
|
||||
|
||||
Processor(const Processor& rhs);
|
||||
bool operator==(const Processor& rhs) const;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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 {
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user