From a0f7d584b69f798164474732f5b1a021f96592b5 Mon Sep 17 00:00:00 2001 From: Adrian Conlon Date: Thu, 30 Nov 2017 14:37:18 +0000 Subject: [PATCH] Correct a few warnings reported by "clang" Signed-off-by: Adrian Conlon --- Z80/inc/Z80.h | 8 ++++---- inc/IntelProcessor.h | 2 +- inc/Processor.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Z80/inc/Z80.h b/Z80/inc/Z80.h index 241bdc2..6393ef0 100644 --- a/Z80/inc/Z80.h +++ b/Z80/inc/Z80.h @@ -56,8 +56,8 @@ namespace EightBit { int interrupt(bool maskable, uint8_t value); - virtual int execute(uint8_t opcode); - int step(); + virtual int execute(uint8_t opcode) final; + virtual int step() final; virtual register16_t& AF() override; virtual register16_t& BC() override; @@ -104,8 +104,8 @@ namespace EightBit { std::array m_accumulatorFlags; int m_accumulatorFlagsSet = 0; - register16_t m_ix = { 0xff, 0xff }; - register16_t m_iy = { 0xff, 0xff }; + register16_t m_ix = { { 0xff, 0xff } }; + register16_t m_iy = { { 0xff, 0xff } }; refresh_t m_refresh = 0x7f; diff --git a/inc/IntelProcessor.h b/inc/IntelProcessor.h index 8f60ae9..2378f1f 100644 --- a/inc/IntelProcessor.h +++ b/inc/IntelProcessor.h @@ -172,6 +172,6 @@ namespace EightBit { private: std::array m_decodedOpcodes; - register16_t m_sp = { 0xff, 0xff }; + register16_t m_sp = { { 0xff, 0xff } }; }; } \ No newline at end of file diff --git a/inc/Processor.h b/inc/Processor.h index 7d1ad35..4fb9895 100644 --- a/inc/Processor.h +++ b/inc/Processor.h @@ -141,8 +141,8 @@ namespace EightBit { private: Bus& m_bus; int m_cycles = 0; - register16_t m_pc = { 0, 0 }; - register16_t m_memptr = { 0, 0 }; + register16_t m_pc = { { 0, 0 } }; + register16_t m_memptr = { { 0, 0 } }; bool m_halted = false; bool m_power = false; };