From c9181e5add388e7290eacd6270ccfc1537dde4e3 Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Tue, 9 Aug 2022 14:34:53 -0230 Subject: [PATCH] Some fixes for suggestions from cppcheck. --- src/common/PaletteHandler.cxx | 3 +-- src/common/PaletteHandler.hxx | 2 +- src/emucore/Bankswitch.cxx | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/common/PaletteHandler.cxx b/src/common/PaletteHandler.cxx index 25781e00c..162e8dd71 100644 --- a/src/common/PaletteHandler.cxx +++ b/src/common/PaletteHandler.cxx @@ -77,8 +77,7 @@ void PaletteHandler::cyclePalette(int direction) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool PaletteHandler::isCustomAdjustable() const { - return myCurrentAdjustable >= CUSTOM_START - && myCurrentAdjustable <= CUSTOM_END; + return myCurrentAdjustable <= CUSTOM_END; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/common/PaletteHandler.hxx b/src/common/PaletteHandler.hxx index aa04536e0..87e83acfd 100644 --- a/src/common/PaletteHandler.hxx +++ b/src/common/PaletteHandler.hxx @@ -39,7 +39,7 @@ class PaletteHandler static constexpr float DEF_RGB_SHIFT = 0.0F; static constexpr float MAX_RGB_SHIFT = 22.5F; - enum Adjustables { + enum Adjustables : uInt32 { PHASE_SHIFT, RED_SCALE, GREEN_SCALE, diff --git a/src/emucore/Bankswitch.cxx b/src/emucore/Bankswitch.cxx index 61d91a498..c5aa628b0 100644 --- a/src/emucore/Bankswitch.cxx +++ b/src/emucore/Bankswitch.cxx @@ -211,7 +211,7 @@ Bankswitch::Sizes = {{ { 8_KB, 8_KB+5 }, // _WDSW { 64_KB, 64_KB }, // _X07 #if defined(CUSTOM_ARM) - { Bankswitch::any_KB, Bankswitch::any_KB } } + { Bankswitch::any_KB, Bankswitch::any_KB } #endif }}; #endif // GUI_SUPPORT