From b640da1910161c72b1b8c0698c7d53f6740d5ecb Mon Sep 17 00:00:00 2001 From: Adrian Conlon Date: Tue, 7 Aug 2018 23:06:15 +0100 Subject: [PATCH] Add some noexcept specifications. Just to experiment. Signed-off-by: Adrian Conlon --- inc/IntelProcessor.h | 2 +- inc/Memory.h | 2 +- inc/Ram.h | 2 +- inc/Register.h | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/inc/IntelProcessor.h b/inc/IntelProcessor.h index 2a77b29..01dd294 100644 --- a/inc/IntelProcessor.h +++ b/inc/IntelProcessor.h @@ -21,7 +21,7 @@ namespace EightBit { int p = 0; int q = 0; - opcode_decoded_t() {} + opcode_decoded_t() noexcept {} opcode_decoded_t(const uint8_t opcode) { x = (opcode & 0b11000000) >> 6; // 0 - 3 diff --git a/inc/Memory.h b/inc/Memory.h index 954ef0c..0bd2ef1 100644 --- a/inc/Memory.h +++ b/inc/Memory.h @@ -11,7 +11,7 @@ namespace EightBit { static int load(std::ifstream& file, std::vector& output, int writeOffset = 0, int readOffset = 0, int limit = -1, int maximumSize = -1); static int load(const std::string& path, std::vector& output, int writeOffset = 0, int readOffset = 0, int limit = -1, int maximumSize = -1); - Memory(const size_t size = 0) + Memory(const size_t size = 0) noexcept : m_bytes(size) { } diff --git a/inc/Ram.h b/inc/Ram.h index 2600634..8ef40e7 100644 --- a/inc/Ram.h +++ b/inc/Ram.h @@ -6,7 +6,7 @@ namespace EightBit { class Ram : public Memory { public: - Ram(const size_t size = 0) + Ram(const size_t size = 0) noexcept : Memory(size) { } diff --git a/inc/Register.h b/inc/Register.h index 13184d3..0f2f5d5 100644 --- a/inc/Register.h +++ b/inc/Register.h @@ -30,8 +30,8 @@ namespace EightBit { #endif }; uint16_t word; - register16_t() : word(0) {} - register16_t(uint16_t w) : word(w) {} - register16_t(uint8_t l, uint8_t h) : low(l), high(h) {} + register16_t() noexcept : word(0) {} + register16_t(uint16_t w) noexcept : word(w) {} + register16_t(uint8_t l, uint8_t h) noexcept : low(l), high(h) {} } ; }