From 36683adec192314c4e445cfa745d3244c6640ea5 Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Sat, 28 Dec 2019 00:45:09 -0330 Subject: [PATCH] And yet more fixes for warnings from clang-tidy. --- src/common/Base.cxx | 2 +- src/common/FrameBufferSDL2.cxx | 7 +- src/common/MouseControl.cxx | 10 +- src/common/RewindManager.cxx | 3 +- src/common/SoundSDL2.cxx | 2 +- src/common/StaggeredLogger.cxx | 8 +- src/common/ZipHandler.cxx | 9 +- src/common/ZipHandler.hxx | 2 +- src/common/audio/ConvolutionBuffer.cxx | 4 +- src/common/audio/HighPass.cxx | 2 +- src/common/sdl_blitter/BilinearBlitter.cxx | 4 +- src/common/sdl_blitter/QisBlitter.cxx | 8 +- src/common/stella_icon.hxx | 128 ++++++++++----------- src/common/tv_filters/AtariNTSC.cxx | 2 +- src/debugger/CartDebug.cxx | 4 +- src/debugger/DebuggerParser.cxx | 4 +- src/debugger/DebuggerParser.hxx | 2 +- src/debugger/TIADebug.cxx | 6 +- src/debugger/gui/AudioWidget.cxx | 3 + src/debugger/gui/CartDPCPlusWidget.cxx | 2 +- src/debugger/gui/CartE0Widget.cxx | 2 + src/debugger/gui/CartRamWidget.cxx | 5 - src/debugger/gui/CartRamWidget.hxx | 2 +- src/debugger/gui/CpuWidget.cxx | 19 ++- src/debugger/gui/CpuWidget.hxx | 2 +- src/debugger/gui/DataGridWidget.cxx | 3 + src/debugger/gui/DebuggerDialog.cxx | 10 +- src/debugger/gui/DelayQueueWidget.cxx | 2 +- src/debugger/gui/DelayQueueWidget.hxx | 4 +- src/debugger/gui/DrivingWidget.cxx | 2 + src/debugger/gui/GenesisWidget.cxx | 7 +- src/debugger/gui/GenesisWidget.hxx | 8 +- src/debugger/gui/JoystickWidget.cxx | 5 +- src/debugger/gui/JoystickWidget.hxx | 8 +- src/debugger/gui/KeyboardWidget.cxx | 18 +-- src/debugger/gui/KeyboardWidget.hxx | 17 ++- src/debugger/gui/PaddleWidget.cxx | 6 +- src/debugger/gui/PointingDeviceWidget.cxx | 2 + src/debugger/gui/PromptWidget.cxx | 22 ++-- src/debugger/gui/PromptWidget.hxx | 4 +- src/debugger/gui/RamWidget.cxx | 8 +- src/debugger/gui/RamWidget.hxx | 5 +- src/debugger/gui/RiotWidget.cxx | 59 ++++++---- src/debugger/gui/RomListSettings.cxx | 2 + src/debugger/gui/TiaOutputWidget.cxx | 63 +++++----- src/debugger/gui/TiaWidget.cxx | 19 ++- src/debugger/gui/ToggleWidget.cxx | 14 +-- src/emucore/AmigaMouse.hxx | 10 +- src/emucore/AtariMouse.hxx | 10 +- src/emucore/CartBUS.cxx | 5 + src/emucore/CartCDF.cxx | 2 + src/emucore/CartDPC.cxx | 4 +- src/emucore/CartDPCPlus.cxx | 9 +- src/emucore/DefProps.hxx | 6 +- src/emucore/Driving.cxx | 2 +- src/emucore/EventHandler.cxx | 72 ++++++------ src/emucore/FSNode.cxx | 5 - src/emucore/FSNode.hxx | 2 +- src/emucore/KidVid.cxx | 8 +- src/emucore/KidVid.hxx | 18 +-- src/emucore/M6532.cxx | 9 +- src/emucore/PointingDevice.cxx | 2 +- src/emucore/PropsSet.cxx | 2 +- src/emucore/Settings.cxx | 3 +- src/emucore/TIASurface.cxx | 2 +- src/emucore/Thumbulator.cxx | 24 ++-- src/emucore/TrakBall.hxx | 10 +- src/emucore/tia/Ball.cxx | 2 +- src/gui/ConsoleBFont.hxx | 2 +- src/gui/ConsoleFont.hxx | 2 +- src/gui/ConsoleMediumBFont.hxx | 2 +- src/gui/ConsoleMediumFont.hxx | 2 +- src/gui/StellaMediumFont.hxx | 2 +- src/tools/convbdf.c | 2 +- src/tools/create_props.pl | 6 +- src/yacc/YaccParser.cxx | 2 +- 76 files changed, 414 insertions(+), 343 deletions(-) diff --git a/src/common/Base.cxx b/src/common/Base.cxx index bdb34f531..0f110e938 100644 --- a/src/common/Base.cxx +++ b/src/common/Base.cxx @@ -22,7 +22,7 @@ namespace Common { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - string Base::toString(int value, Common::Base::Fmt outputBase) { - static char vToS_buf[32]; + static char vToS_buf[32]; // NOLINT - One place where C-style is acceptable if(outputBase == Base::Fmt::_DEFAULT) outputBase = myDefaultBase; diff --git a/src/common/FrameBufferSDL2.cxx b/src/common/FrameBufferSDL2.cxx index e74776d77..775fbef82 100644 --- a/src/common/FrameBufferSDL2.cxx +++ b/src/common/FrameBufferSDL2.cxx @@ -148,15 +148,14 @@ void FrameBufferSDL2::queryHardware(vector& fullscreenRes, string stellaName; }; // Create name map for all currently known SDL renderers - const int NUM_RENDERERS = 6; - static const RenderName RENDERER_NAMES[NUM_RENDERERS] = { + static const std::array RENDERER_NAMES = {{ { "direct3d", "Direct3D" }, { "metal", "Metal" }, { "opengl", "OpenGL" }, { "opengles", "OpenGLES" }, { "opengles2", "OpenGLES2" }, { "software", "Software" } - }; + }}; int numDrivers = SDL_GetNumRenderDrivers(); for(int i = 0; i < numDrivers; ++i) @@ -166,7 +165,7 @@ void FrameBufferSDL2::queryHardware(vector& fullscreenRes, { // Map SDL names into nicer Stella names (if available) bool found = false; - for(int j = 0; j < NUM_RENDERERS; ++j) + for(size_t j = 0; j < RENDERER_NAMES.size(); ++j) { if(RENDERER_NAMES[j].sdlName == info.name) { diff --git a/src/common/MouseControl.cxx b/src/common/MouseControl.cxx index 61e31547a..49de365b2 100644 --- a/src/common/MouseControl.cxx +++ b/src/common/MouseControl.cxx @@ -35,7 +35,7 @@ MouseControl::MouseControl(Console& console, const string& mode) if(BSPF::equalsIgnoreCase(m_mode, "none")) { - myModeList.push_back(MouseMode("Mouse input is disabled")); + myModeList.emplace_back("Mouse input is disabled"); return; } else if(!BSPF::equalsIgnoreCase(m_mode, "auto") && m_mode.length() == 2 && @@ -103,7 +103,7 @@ MouseControl::MouseControl(Console& console, const string& mode) msg << ", Y-axis is "; MControlToController(yaxis, ytype, yid); - myModeList.push_back(MouseMode(xtype, xid, ytype, yid, msg.str())); + myModeList.emplace_back(xtype, xid, ytype, yid, msg.str()); } // Now consider the possible modes for the mouse based on the left @@ -129,7 +129,7 @@ MouseControl::MouseControl(Console& console, const string& mode) // If the mouse isn't used at all, we still need one item in the list if(myModeList.size() == 0) - myModeList.push_back(MouseMode("Mouse not used for current controllers")); + myModeList.emplace_back("Mouse not used for current controllers"); #if 0 for(const auto& m: myModeList) @@ -165,7 +165,7 @@ void MouseControl::addLeftControllerModes(bool noswap) msg << "Mouse is left " << myLeftController.name() << " controller"; Controller::Type type = myLeftController.type(); int id = noswap ? 0 : 1; - myModeList.push_back(MouseMode(type, id, type, id, msg.str())); + myModeList.emplace_back(type, id, type, id, msg.str()); } } } @@ -186,7 +186,7 @@ void MouseControl::addRightControllerModes(bool noswap) msg << "Mouse is right " << myRightController.name() << " controller"; Controller::Type type = myRightController.type(); int id = noswap ? 1 : 0; - myModeList.push_back(MouseMode(type, id, type, id, msg.str())); + myModeList.emplace_back(type, id, type, id, msg.str()); } } } diff --git a/src/common/RewindManager.cxx b/src/common/RewindManager.cxx index 581f7173f..5b2e9894c 100644 --- a/src/common/RewindManager.cxx +++ b/src/common/RewindManager.cxx @@ -404,7 +404,8 @@ string RewindManager::getUnitString(Int64 cycles) { constexpr Int32 NTSC_FREQ = 1193182; // ~76*262*60 constexpr Int32 PAL_FREQ = 1182298; // ~76*312*50 - const Int32 scanlines = std::max(myOSystem.console().tia().scanlinesLastFrame(), 240u); + const Int32 scanlines = std::max( + myOSystem.console().tia().scanlinesLastFrame(), 240); const bool isNTSC = scanlines <= 287; const Int32 freq = isNTSC ? NTSC_FREQ : PAL_FREQ; // = cycles/second diff --git a/src/common/SoundSDL2.cxx b/src/common/SoundSDL2.cxx index 12c2be304..15bffc416 100644 --- a/src/common/SoundSDL2.cxx +++ b/src/common/SoundSDL2.cxx @@ -215,7 +215,7 @@ void SoundSDL2::setVolume(uInt32 percent) myVolume = percent; SDL_LockAudioDevice(myDevice); - myVolumeFactor = static_cast(percent) / 100.f; + myVolumeFactor = static_cast(percent) / 100.F; SDL_UnlockAudioDevice(myDevice); } } diff --git a/src/common/StaggeredLogger.cxx b/src/common/StaggeredLogger.cxx index 44b9186ff..07d1bc8dd 100644 --- a/src/common/StaggeredLogger.cxx +++ b/src/common/StaggeredLogger.cxx @@ -27,11 +27,11 @@ namespace { { std::tm now = BSPF::localTime(); - char formattedTime[100]; - formattedTime[99] = 0; - std::strftime(formattedTime, 99, "%H:%M:%S", &now); + std::array formattedTime; + formattedTime.fill(0); + std::strftime(formattedTime.data(), 99, "%H:%M:%S", &now); - return formattedTime; + return formattedTime.data(); } } diff --git a/src/common/ZipHandler.cxx b/src/common/ZipHandler.cxx index 0c6b38781..5f049650b 100644 --- a/src/common/ZipHandler.cxx +++ b/src/common/ZipHandler.cxx @@ -22,11 +22,6 @@ #include "Bankswitch.hxx" #include "ZipHandler.hxx" -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -ZipHandler::ZipHandler() -{ -} - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void ZipHandler::open(const string& filename) { @@ -131,7 +126,7 @@ uInt64 ZipHandler::decompress(ByteBuffer& image) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - string ZipHandler::errorMessage(ZipError err) const { - static const char* const zip_error_s[] = { + static constexpr std::array zip_error_s = { "ZIP NONE", "ZIP OUT_OF_MEMORY", "ZIP FILE_ERROR", @@ -143,7 +138,7 @@ string ZipHandler::errorMessage(ZipError err) const "ZIP LZMA_UNSUPPORTED", "ZIP BUFFER_TOO_SMALL" }; - return zip_error_s[int(err)]; + return zip_error_s[static_cast(err)]; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/common/ZipHandler.hxx b/src/common/ZipHandler.hxx index 33e72f826..d4bb1bcd5 100644 --- a/src/common/ZipHandler.hxx +++ b/src/common/ZipHandler.hxx @@ -32,7 +32,7 @@ class ZipHandler { public: - ZipHandler(); + ZipHandler() = default; // Open ZIP file for processing // An exception will be thrown on any errors diff --git a/src/common/audio/ConvolutionBuffer.cxx b/src/common/audio/ConvolutionBuffer.cxx index 5ef22ef6e..e3b352b53 100644 --- a/src/common/audio/ConvolutionBuffer.cxx +++ b/src/common/audio/ConvolutionBuffer.cxx @@ -23,7 +23,7 @@ ConvolutionBuffer::ConvolutionBuffer(uInt32 size) mySize(size) { myData = make_unique(mySize); - std::fill_n(myData.get(), mySize, 0.f); + std::fill_n(myData.get(), mySize, 0.F); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -36,7 +36,7 @@ void ConvolutionBuffer::shift(float nextValue) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - float ConvolutionBuffer::convoluteWith(float* kernel) const { - float result = 0.; + float result = 0.F; for (uInt32 i = 0; i < mySize; ++i) { result += kernel[i] * myData[(myFirstIndex + i) % mySize]; diff --git a/src/common/audio/HighPass.cxx b/src/common/audio/HighPass.cxx index c2fe32b1d..632c44774 100644 --- a/src/common/audio/HighPass.cxx +++ b/src/common/audio/HighPass.cxx @@ -22,7 +22,7 @@ HighPass::HighPass(float cutOffFrequency, float frequency) : myLastValueIn(0), myLastValueOut(0), - myAlpha(1.f / (1.f + 2.f*BSPF::PI_f*cutOffFrequency/frequency)) + myAlpha(1.F / (1.F + 2.F*BSPF::PI_f*cutOffFrequency/frequency)) { } diff --git a/src/common/sdl_blitter/BilinearBlitter.cxx b/src/common/sdl_blitter/BilinearBlitter.cxx index 082fdbf28..d56fdb442 100644 --- a/src/common/sdl_blitter/BilinearBlitter.cxx +++ b/src/common/sdl_blitter/BilinearBlitter.cxx @@ -75,7 +75,7 @@ void BilinearBlitter::free() ASSERT_MAIN_THREAD; - SDL_Texture* textures[] = {myTexture, mySecondaryTexture}; + std::array textures = { myTexture, mySecondaryTexture }; for (SDL_Texture* texture: textures) { if (!texture) continue; @@ -135,7 +135,7 @@ void BilinearBlitter::recreateTexturesIfNecessary() if (myAttributes.blending) { uInt8 blendAlpha = uInt8(myAttributes.blendalpha * 2.55); - SDL_Texture* textures[] = {myTexture, mySecondaryTexture}; + std::array textures = { myTexture, mySecondaryTexture }; for (SDL_Texture* texture: textures) { if (!texture) continue; diff --git a/src/common/sdl_blitter/QisBlitter.cxx b/src/common/sdl_blitter/QisBlitter.cxx index 9141e60cc..5014c81c7 100644 --- a/src/common/sdl_blitter/QisBlitter.cxx +++ b/src/common/sdl_blitter/QisBlitter.cxx @@ -84,7 +84,9 @@ void QisBlitter::free() ASSERT_MAIN_THREAD; - SDL_Texture* textures[] = {mySrcTexture, myIntermediateTexture, mySecondaryIntermedateTexture}; + std::array textures = { + mySrcTexture, myIntermediateTexture, mySecondaryIntermedateTexture + }; for (SDL_Texture* texture: textures) { if (!texture) continue; @@ -179,7 +181,9 @@ void QisBlitter::recreateTexturesIfNecessary() if (myAttributes.blending) { uInt8 blendAlpha = uInt8(myAttributes.blendalpha * 2.55); - SDL_Texture* textures[] = {mySrcTexture, myIntermediateTexture, mySecondaryIntermedateTexture}; + std::array textures = { + mySrcTexture, myIntermediateTexture, mySecondaryIntermedateTexture + }; for (SDL_Texture* texture: textures) { if (!texture) continue; diff --git a/src/common/stella_icon.hxx b/src/common/stella_icon.hxx index ccb300437..dc52cd349 100644 --- a/src/common/stella_icon.hxx +++ b/src/common/stella_icon.hxx @@ -1,66 +1,66 @@ -static uInt32 stella_icon[] = { - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, - 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, - 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, - 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, - 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, - 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, - 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, - 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, - 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, - 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, - 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, - 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, - 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, - 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, - 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, - 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, - 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, - 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0x00000000, - 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, - 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0x00000000, - 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, - 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, - 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, - 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, - 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, - 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, - 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, - 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, - 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, - 0xFF000000, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0x00000000, - 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, - 0xFF000000, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, +static uInt32 stella_icon[] = { // NOLINT + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, + 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, + 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0x00000000, + 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0x00000000, + 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, + 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, + 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, + 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF000000, 0xFF000000, 0x00000000, + 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, + 0xFF000000, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0x00000000, + 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, + 0xFF000000, 0xFF000000, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }; diff --git a/src/common/tv_filters/AtariNTSC.cxx b/src/common/tv_filters/AtariNTSC.cxx index acb58498e..8ebde7f92 100644 --- a/src/common/tv_filters/AtariNTSC.cxx +++ b/src/common/tv_filters/AtariNTSC.cxx @@ -95,7 +95,7 @@ void AtariNTSC::enableThreading(bool enable) myWorkerThreads = systemThreads - 1; myTotalThreads = systemThreads; - myThreads = make_unique(myWorkerThreads); + myThreads = make_unique(myWorkerThreads); // NOLINT } } diff --git a/src/debugger/CartDebug.cxx b/src/debugger/CartDebug.cxx index 10ac78f3a..432aa7fdb 100644 --- a/src/debugger/CartDebug.cxx +++ b/src/debugger/CartDebug.cxx @@ -204,7 +204,7 @@ string CartDebug::toString() // bytes have been previously output if(state.rport[i] - curraddr > bytesPerLine || bytesSoFar >= 256) { - char port[37]; + char port[37]; // NOLINT (convert to stringstream) std::snprintf(port, 36, "%04x: (rport = %04x, wport = %04x)\n", state.rport[i], state.rport[i], state.wport[i]); port[2] = port[3] = 'x'; @@ -665,6 +665,8 @@ bool CartDebug::getLabel(ostream& buf, uInt16 addr, bool isRead, int places) con case 8: buf << "$" << Base::HEX8 << addr; return true; + default: + break; } return false; diff --git a/src/debugger/DebuggerParser.cxx b/src/debugger/DebuggerParser.cxx index 03006ba61..625265248 100644 --- a/src/debugger/DebuggerParser.cxx +++ b/src/debugger/DebuggerParser.cxx @@ -408,7 +408,7 @@ bool DebuggerParser::validateArgs(int cmd) { // cerr << "entering validateArgs(" << cmd << ")" << endl; bool required = commands[cmd].parmsRequired; - Parameters* p = commands[cmd].parms; + Parameters* p = commands[cmd].parms.data(); if(argCount == 0) { @@ -434,7 +434,7 @@ bool DebuggerParser::validateArgs(int cmd) // In this case, the required number of arguments is unbounded argRequiredCount = (*p == Parameters::ARG_END_ARGS) ? count : argCount; - p = commands[cmd].parms; + p = commands[cmd].parms.data(); uInt32 curCount = 0; do { diff --git a/src/debugger/DebuggerParser.hxx b/src/debugger/DebuggerParser.hxx index 874b3c0ea..10b2c63f6 100644 --- a/src/debugger/DebuggerParser.hxx +++ b/src/debugger/DebuggerParser.hxx @@ -94,7 +94,7 @@ class DebuggerParser string extendedDesc; bool parmsRequired; bool refreshRequired; - Parameters parms[10]; + std::array parms; std::function executor; }; static std::array commands; diff --git a/src/debugger/TIADebug.cxx b/src/debugger/TIADebug.cxx index a4f6aa592..38fe1e76f 100644 --- a/src/debugger/TIADebug.cxx +++ b/src/debugger/TIADebug.cxx @@ -971,12 +971,12 @@ string TIADebug::colorSwatch(uInt8 c) const string TIADebug::audFreq(uInt8 div) { string ret; - char buf[10]; + std::array buf; double hz = 31400.0; if(div) hz /= div; - std::snprintf(buf, 9, "%5.1f", hz); - ret += buf; + std::snprintf(buf.data(), 9, "%5.1f", hz); + ret += buf.data(); ret += "Hz"; return ret; diff --git a/src/debugger/gui/AudioWidget.cxx b/src/debugger/gui/AudioWidget.cxx index daf942cf6..8578be5a7 100644 --- a/src/debugger/gui/AudioWidget.cxx +++ b/src/debugger/gui/AudioWidget.cxx @@ -222,6 +222,9 @@ void AudioWidget::changeVolumeRegs() case kAud1Addr: instance().debugger().tiaDebug().audV1(value); break; + + default: + break; } handleVolume(); } diff --git a/src/debugger/gui/CartDPCPlusWidget.cxx b/src/debugger/gui/CartDPCPlusWidget.cxx index f8fca5bfb..48aac3c19 100644 --- a/src/debugger/gui/CartDPCPlusWidget.cxx +++ b/src/debugger/gui/CartDPCPlusWidget.cxx @@ -326,7 +326,7 @@ string CartridgeDPCPlusWidget::bankState() { ostringstream& buf = buffer(); - static const char* const spot[] = { + static constexpr std::array spot = { "$FFF6", "$FFF7", "$FFF8", "$FFF9", "$FFFA", "$FFFB" }; buf << "Bank = " << std::dec << myCart.getBank() diff --git a/src/debugger/gui/CartE0Widget.cxx b/src/debugger/gui/CartE0Widget.cxx index aa87a50a2..fcdf72e55 100644 --- a/src/debugger/gui/CartE0Widget.cxx +++ b/src/debugger/gui/CartE0Widget.cxx @@ -122,6 +122,8 @@ void CartridgeE0Widget::handleCommand(CommandSender* sender, case kSlice2Changed: myCart.segmentTwo(mySlice2->getSelected()); break; + default: + break; } myCart.lockBank(); diff --git a/src/debugger/gui/CartRamWidget.cxx b/src/debugger/gui/CartRamWidget.cxx index ad9d69e27..6dbaf8968 100644 --- a/src/debugger/gui/CartRamWidget.cxx +++ b/src/debugger/gui/CartRamWidget.cxx @@ -116,11 +116,6 @@ CartRamWidget::InternalRamWidget::InternalRamWidget(GuiObject* boss, { } -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -CartRamWidget::InternalRamWidget::~InternalRamWidget() -{ -} - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - uInt8 CartRamWidget::InternalRamWidget::getValue(int addr) const { diff --git a/src/debugger/gui/CartRamWidget.hxx b/src/debugger/gui/CartRamWidget.hxx index 6459b6d46..286069820 100644 --- a/src/debugger/gui/CartRamWidget.hxx +++ b/src/debugger/gui/CartRamWidget.hxx @@ -66,7 +66,7 @@ class CartRamWidget : public Widget, public CommandSender const GUI::Font& nfont, int x, int y, int w, int h, CartDebugWidget& cartDebug); - virtual ~InternalRamWidget(); + virtual ~InternalRamWidget() = default; private: uInt8 getValue(int addr) const override; diff --git a/src/debugger/gui/CpuWidget.cxx b/src/debugger/gui/CpuWidget.cxx index d4bd7e6ce..7736af47d 100644 --- a/src/debugger/gui/CpuWidget.cxx +++ b/src/debugger/gui/CpuWidget.cxx @@ -100,7 +100,7 @@ CpuWidget::CpuWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n // Add labels for other CPU registers xpos = x; - string labels[4] = { "SP ", "A ", "X ", "Y " }; + const std::array labels = { "SP ", "A ", "X ", "Y " }; for(int row = 0; row < 4; ++row) { new StaticTextWidget(boss, lfont, xpos, ypos + row*lineHeight + 1, @@ -118,8 +118,8 @@ CpuWidget::CpuWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n // Set the strings to be used in the PSRegister // We only do this once because it's the state that changes, not the strings - const char* const offstr[] = { "n", "v", "-", "b", "d", "i", "z", "c" }; - const char* const onstr[] = { "N", "V", "-", "B", "D", "I", "Z", "C" }; + const std::array offstr = { "n", "v", "-", "b", "d", "i", "z", "c" }; + const std::array onstr = { "N", "V", "-", "B", "D", "I", "Z", "C" }; StringList off, on; for(int i = 0; i < 8; ++i) { @@ -170,6 +170,9 @@ void CpuWidget::handleCommand(CommandSender* sender, int cmd, int data, int id) addr = myCpuGridBinValue->getSelectedAddr(); value = myCpuGridBinValue->getSelectedValue(); break; + + default: + break; } switch(addr) @@ -211,6 +214,9 @@ void CpuWidget::handleCommand(CommandSender* sender, int cmd, int data, int id) myCpuGridDecValue->setValueInternal(3, value); myCpuGridBinValue->setValueInternal(3, value); break; + + default: + break; } break; @@ -247,8 +253,15 @@ void CpuWidget::handleCommand(CommandSender* sender, int cmd, int data, int id) case kPSRegC: dbg.setC(state); break; + + default: + break; } } + break; + + default: + break; } } diff --git a/src/debugger/gui/CpuWidget.hxx b/src/debugger/gui/CpuWidget.hxx index c75f8511c..2a06cf3a0 100644 --- a/src/debugger/gui/CpuWidget.hxx +++ b/src/debugger/gui/CpuWidget.hxx @@ -73,9 +73,9 @@ class CpuWidget : public Widget, public CommandSender DataGridWidget* myCpuGrid; DataGridWidget* myCpuGridDecValue; DataGridWidget* myCpuGridBinValue; - EditTextWidget* myCpuDataSrc[4]; ToggleBitWidget* myPSRegister; EditTextWidget* myPCLabel; + std::array myCpuDataSrc; private: // Following constructors and assignment operators not supported diff --git a/src/debugger/gui/DataGridWidget.cxx b/src/debugger/gui/DataGridWidget.cxx index 693fc6a87..9b735708a 100644 --- a/src/debugger/gui/DataGridWidget.cxx +++ b/src/debugger/gui/DataGridWidget.cxx @@ -586,6 +586,9 @@ void DataGridWidget::handleCommand(CommandSender* sender, int cmd, case kDGShiftRCmd: rshiftCell(); break; + + default: + return; } } diff --git a/src/debugger/gui/DebuggerDialog.cxx b/src/debugger/gui/DebuggerDialog.cxx index 73e5aba1a..5a9c27731 100644 --- a/src/debugger/gui/DebuggerDialog.cxx +++ b/src/debugger/gui/DebuggerDialog.cxx @@ -490,8 +490,7 @@ void DebuggerDialog::addStatusArea() // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void DebuggerDialog::addRomArea() { - static uInt32 LEFT_ARROW[11] = - { + static constexpr std::array LEFT_ARROW = { 0b0000010, 0b0000110, 0b0001110, @@ -504,8 +503,7 @@ void DebuggerDialog::addRomArea() 0b0000110, 0b0000010 }; - static uInt32 RIGHT_ARROW[11] = - { + static constexpr std::array RIGHT_ARROW = { 0b0100000, 0b0110000, 0b0111000, @@ -556,7 +554,7 @@ void DebuggerDialog::addRomArea() myRewindButton = new ButtonWidget(this, *myLFont, buttonX, buttonY, - bwidth, bheight, LEFT_ARROW, 7, 11, kDDRewindCmd, true); + bwidth, bheight, LEFT_ARROW.data(), 7, 11, kDDRewindCmd, true); myRewindButton->clearFlags(Widget::FLAG_ENABLED); buttonY += bheight + 4; @@ -564,7 +562,7 @@ void DebuggerDialog::addRomArea() myUnwindButton = new ButtonWidget(this, *myLFont, buttonX, buttonY, - bwidth, bheight, RIGHT_ARROW, 7, 11, kDDUnwindCmd, true); + bwidth, bheight, RIGHT_ARROW.data(), 7, 11, kDDUnwindCmd, true); myUnwindButton->clearFlags(Widget::FLAG_ENABLED); int xpos = buttonX - 8*myLFont->getMaxCharWidth() - 20, ypos = 30; diff --git a/src/debugger/gui/DelayQueueWidget.cxx b/src/debugger/gui/DelayQueueWidget.cxx index 5b56694d6..cd544faa1 100644 --- a/src/debugger/gui/DelayQueueWidget.cxx +++ b/src/debugger/gui/DelayQueueWidget.cxx @@ -37,7 +37,7 @@ DelayQueueWidget::DelayQueueWidget( _textcolor = kTextColor; _w = 20 * font.getMaxCharWidth() + 6; - _h = lineCount * font.getLineHeight() + 6; + _h = myLines.size() * font.getLineHeight() + 6; for (auto&& line : myLines) line = ""; } diff --git a/src/debugger/gui/DelayQueueWidget.hxx b/src/debugger/gui/DelayQueueWidget.hxx index 47722eda6..c56565f27 100644 --- a/src/debugger/gui/DelayQueueWidget.hxx +++ b/src/debugger/gui/DelayQueueWidget.hxx @@ -36,9 +36,7 @@ class DelayQueueWidget : public Widget void drawWidget(bool hilite) override; private: - static constexpr uInt8 lineCount = 4; - - string myLines[lineCount]; + std::array myLines; private: DelayQueueWidget() = delete; diff --git a/src/debugger/gui/DrivingWidget.cxx b/src/debugger/gui/DrivingWidget.cxx index 68c20f0cb..572966d02 100644 --- a/src/debugger/gui/DrivingWidget.cxx +++ b/src/debugger/gui/DrivingWidget.cxx @@ -96,6 +96,8 @@ void DrivingWidget::handleCommand( case kFireCmd: setPin(Controller::DigitalPin::Six, !myFire->getState()); break; + default: + break; } } diff --git a/src/debugger/gui/GenesisWidget.cxx b/src/debugger/gui/GenesisWidget.cxx index 2503d2887..c4fa75bb0 100644 --- a/src/debugger/gui/GenesisWidget.cxx +++ b/src/debugger/gui/GenesisWidget.cxx @@ -102,12 +102,11 @@ void GenesisWidget::handleCommand( myPins[id]->getState() ? Controller::MAX_RESISTANCE : Controller::MIN_RESISTANCE); break; + default: + break; } } } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Controller::DigitalPin GenesisWidget::ourPinNo[5] = { - Controller::DigitalPin::One, Controller::DigitalPin::Two, Controller::DigitalPin::Three, Controller::DigitalPin::Four, - Controller::DigitalPin::Six -}; +constexpr std::array GenesisWidget::ourPinNo; diff --git a/src/debugger/gui/GenesisWidget.hxx b/src/debugger/gui/GenesisWidget.hxx index 37135f5a9..ca3be94fd 100644 --- a/src/debugger/gui/GenesisWidget.hxx +++ b/src/debugger/gui/GenesisWidget.hxx @@ -31,8 +31,12 @@ class GenesisWidget : public ControllerWidget private: enum { kJUp = 0, kJDown, kJLeft, kJRight, kJBbtn, kJCbtn }; - CheckboxWidget* myPins[6]; - static Controller::DigitalPin ourPinNo[5]; + std::array myPins; + static constexpr std::array ourPinNo = {{ + Controller::DigitalPin::One, Controller::DigitalPin::Two, + Controller::DigitalPin::Three, Controller::DigitalPin::Four, + Controller::DigitalPin::Six + }}; private: void loadConfig() override; diff --git a/src/debugger/gui/JoystickWidget.cxx b/src/debugger/gui/JoystickWidget.cxx index 42f0c4761..e95dac620 100644 --- a/src/debugger/gui/JoystickWidget.cxx +++ b/src/debugger/gui/JoystickWidget.cxx @@ -81,7 +81,4 @@ void JoystickWidget::handleCommand( } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Controller::DigitalPin JoystickWidget::ourPinNo[5] = { - Controller::DigitalPin::One, Controller::DigitalPin::Two, Controller::DigitalPin::Three, Controller::DigitalPin::Four, - Controller::DigitalPin::Six -}; +constexpr std::array JoystickWidget::ourPinNo; diff --git a/src/debugger/gui/JoystickWidget.hxx b/src/debugger/gui/JoystickWidget.hxx index bd64e1b47..c2d47535f 100644 --- a/src/debugger/gui/JoystickWidget.hxx +++ b/src/debugger/gui/JoystickWidget.hxx @@ -31,8 +31,12 @@ class JoystickWidget : public ControllerWidget private: enum { kJUp = 0, kJDown, kJLeft, kJRight, kJFire }; - CheckboxWidget* myPins[5]; - static Controller::DigitalPin ourPinNo[5]; + std::array myPins; + static constexpr std::array ourPinNo = {{ + Controller::DigitalPin::One, Controller::DigitalPin::Two, + Controller::DigitalPin::Three, Controller::DigitalPin::Four, + Controller::DigitalPin::Six + }}; private: void loadConfig() override; diff --git a/src/debugger/gui/KeyboardWidget.cxx b/src/debugger/gui/KeyboardWidget.cxx index 1d3b90873..f41556fb4 100644 --- a/src/debugger/gui/KeyboardWidget.cxx +++ b/src/debugger/gui/KeyboardWidget.cxx @@ -48,7 +48,7 @@ KeyboardWidget::KeyboardWidget(GuiObject* boss, const GUI::Font& font, ypos += myBox[i]->getHeight() + 5; } } - myEvent = leftport ? ourLeftEvents : ourRightEvents; + myEvent = leftport ? ourLeftEvents.data() : ourRightEvents.data(); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -68,17 +68,5 @@ void KeyboardWidget::handleCommand( } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Event::Type KeyboardWidget::ourLeftEvents[12] = { - Event::KeyboardZero1, Event::KeyboardZero2, Event::KeyboardZero3, - Event::KeyboardZero4, Event::KeyboardZero5, Event::KeyboardZero6, - Event::KeyboardZero7, Event::KeyboardZero8, Event::KeyboardZero9, - Event::KeyboardZeroStar, Event::KeyboardZero0, Event::KeyboardZeroPound -}; - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Event::Type KeyboardWidget::ourRightEvents[12] = { - Event::KeyboardOne1, Event::KeyboardOne2, Event::KeyboardOne3, - Event::KeyboardOne4, Event::KeyboardOne5, Event::KeyboardOne6, - Event::KeyboardOne7, Event::KeyboardOne8, Event::KeyboardOne9, - Event::KeyboardOneStar, Event::KeyboardOne0, Event::KeyboardOnePound -}; +constexpr std::array KeyboardWidget::ourLeftEvents; +constexpr std::array KeyboardWidget::ourRightEvents; diff --git a/src/debugger/gui/KeyboardWidget.hxx b/src/debugger/gui/KeyboardWidget.hxx index ee9f316f1..fcd7ce0e3 100644 --- a/src/debugger/gui/KeyboardWidget.hxx +++ b/src/debugger/gui/KeyboardWidget.hxx @@ -29,10 +29,21 @@ class KeyboardWidget : public ControllerWidget virtual ~KeyboardWidget() = default; private: - CheckboxWidget* myBox[12]; - Event::Type* myEvent; + std::array myBox; + const Event::Type* myEvent; - static Event::Type ourLeftEvents[12], ourRightEvents[12]; + static constexpr std::array ourLeftEvents = {{ + Event::KeyboardZero1, Event::KeyboardZero2, Event::KeyboardZero3, + Event::KeyboardZero4, Event::KeyboardZero5, Event::KeyboardZero6, + Event::KeyboardZero7, Event::KeyboardZero8, Event::KeyboardZero9, + Event::KeyboardZeroStar, Event::KeyboardZero0, Event::KeyboardZeroPound + }}; + static constexpr std::array ourRightEvents = {{ + Event::KeyboardOne1, Event::KeyboardOne2, Event::KeyboardOne3, + Event::KeyboardOne4, Event::KeyboardOne5, Event::KeyboardOne6, + Event::KeyboardOne7, Event::KeyboardOne8, Event::KeyboardOne9, + Event::KeyboardOneStar, Event::KeyboardOne0, Event::KeyboardOnePound + }}; private: void loadConfig() override; diff --git a/src/debugger/gui/PaddleWidget.cxx b/src/debugger/gui/PaddleWidget.cxx index 1422102c9..9ef6a74ae 100644 --- a/src/debugger/gui/PaddleWidget.cxx +++ b/src/debugger/gui/PaddleWidget.cxx @@ -83,11 +83,11 @@ void PaddleWidget::handleCommand( { case kP0Changed: setPin(Controller::AnalogPin::Nine, - Int32(Paddles::MAX_RESISTANCE - myP0Resistance->getValue())); + static_cast(Paddles::MAX_RESISTANCE - myP0Resistance->getValue())); break; case kP1Changed: setPin(Controller::AnalogPin::Five, - Int32(Paddles::MAX_RESISTANCE - myP1Resistance->getValue())); + static_cast(Paddles::MAX_RESISTANCE - myP1Resistance->getValue())); break; case kP0Fire: setPin(Controller::DigitalPin::Four, !myP0Fire->getState()); @@ -95,5 +95,7 @@ void PaddleWidget::handleCommand( case kP1Fire: setPin(Controller::DigitalPin::Three, !myP1Fire->getState()); break; + default: + break; } } diff --git a/src/debugger/gui/PointingDeviceWidget.cxx b/src/debugger/gui/PointingDeviceWidget.cxx index 7e47d35f7..85ad681ce 100644 --- a/src/debugger/gui/PointingDeviceWidget.cxx +++ b/src/debugger/gui/PointingDeviceWidget.cxx @@ -110,6 +110,8 @@ void PointingDeviceWidget::handleCommand(CommandSender* sender, int cmd, int dat case kTBFire: setPin(Controller::DigitalPin::Six, !myFire->getState()); break; + default: + break; } } diff --git a/src/debugger/gui/PromptWidget.cxx b/src/debugger/gui/PromptWidget.cxx index 4189c353a..eca544869 100644 --- a/src/debugger/gui/PromptWidget.cxx +++ b/src/debugger/gui/PromptWidget.cxx @@ -209,7 +209,7 @@ bool PromptWidget::handleKeyDown(StellaKey key, StellaMod mod) int lastDelimPos = -1; char delimiter = '\0'; - char inputStr[256]; + char inputStr[256]; // NOLINT (will be rewritten soon) for (int i = 0; i < len; i++) { inputStr[i] = buffer(_promptStartPos + i) & 0x7f; @@ -491,16 +491,14 @@ void PromptWidget::insertIntoPrompt(const char* str) void PromptWidget::handleCommand(CommandSender* sender, int cmd, int data, int id) { - switch (cmd) + if(cmd == GuiObject::kSetPositionCmd) { - case GuiObject::kSetPositionCmd: - int newPos = int(data) + _linesPerPage - 1 + _firstLineInBuffer; - if (newPos != _scrollLine) - { - _scrollLine = newPos; - setDirty(); - } - break; + int newPos = int(data) + _linesPerPage - 1 + _firstLineInBuffer; + if (newPos != _scrollLine) + { + _scrollLine = newPos; + setDirty(); + } } } @@ -811,7 +809,7 @@ void PromptWidget::updateScrollBuffer() // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // TODO: rewrite this (cert-dcl50-cpp) -int PromptWidget::printf(const char* format, ...) +int PromptWidget::printf(const char* format, ...) // NOLINT { va_list argptr; @@ -824,7 +822,7 @@ int PromptWidget::printf(const char* format, ...) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - int PromptWidget::vprintf(const char* format, va_list argptr) { - char buf[2048]; // Note: generates warnings about 'nonliteral' format + char buf[2048]; // NOLINT (will be rewritten soon) int count = std::vsnprintf(buf, sizeof(buf), format, argptr); print(buf); diff --git a/src/debugger/gui/PromptWidget.hxx b/src/debugger/gui/PromptWidget.hxx index 0f2d708f3..33f1b1da3 100644 --- a/src/debugger/gui/PromptWidget.hxx +++ b/src/debugger/gui/PromptWidget.hxx @@ -102,7 +102,7 @@ class PromptWidget : public Widget, public CommandSender kHistorySize = 20 }; - int _buffer[kBufferSize]; + int _buffer[kBufferSize]; // NOLINT (will be rewritten soon) int _linesInBuffer; int _lineWidth; @@ -117,7 +117,7 @@ class PromptWidget : public Widget, public CommandSender ScrollBarWidget* _scrollBar; - char _history[kHistorySize][kLineBufferSize]; + char _history[kHistorySize][kLineBufferSize]; // NOLINT (will be rewritten soon) int _historySize; int _historyIndex; int _historyLine; diff --git a/src/debugger/gui/RamWidget.cxx b/src/debugger/gui/RamWidget.cxx index 7c54af2eb..0d77a4981 100644 --- a/src/debugger/gui/RamWidget.cxx +++ b/src/debugger/gui/RamWidget.cxx @@ -199,6 +199,9 @@ void RamWidget::handleCommand(CommandSender* sender, int cmd, int data, int id) addr = myRamGrid->getSelectedAddr(); value = myBinValue->getSelectedValue(); break; + + default: + break; } uInt8 oldval = getValue(addr); @@ -276,6 +279,9 @@ void RamWidget::handleCommand(CommandSender* sender, int cmd, int data, int id) showSearchResults(); fillGrid(false); break; + + default: + break; } } @@ -316,7 +322,7 @@ void RamWidget::fillGrid(bool updateOld) // Update RAM labels uInt32 rport = readPort(start), page = rport & 0xf0; - char buf[5]; + char buf[5]; // NOLINT : convert to stringstream std::snprintf(buf, 5, "%04X", rport); buf[2] = buf[3] = 'x'; myRamStart->setLabel(buf); diff --git a/src/debugger/gui/RamWidget.hxx b/src/debugger/gui/RamWidget.hxx index 66677d5e1..0b1af4c13 100644 --- a/src/debugger/gui/RamWidget.hxx +++ b/src/debugger/gui/RamWidget.hxx @@ -48,7 +48,8 @@ class RamWidget : public Widget, public CommandSender virtual string getLabel(int addr) const = 0; virtual void fillList(uInt32 start, uInt32 size, - IntArray& alist, IntArray& vlist, BoolArray& changed) const = 0; + IntArray& alist, IntArray& vlist, + BoolArray& changed) const = 0; virtual uInt32 readPort(uInt32 start) const = 0; virtual const ByteArray& currentRam(uInt32 start) const = 0; @@ -92,7 +93,7 @@ class RamWidget : public Widget, public CommandSender unique_ptr myInputBox; StaticTextWidget* myRamStart; - StaticTextWidget* myRamLabels[16]; + std::array myRamLabels; DataGridWidget* myRamGrid; DataGridWidget* myDecValue; diff --git a/src/debugger/gui/RiotWidget.cxx b/src/debugger/gui/RiotWidget.cxx index 1d7617da4..086d56c88 100644 --- a/src/debugger/gui/RiotWidget.cxx +++ b/src/debugger/gui/RiotWidget.cxx @@ -101,7 +101,9 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& lfont, CREATE_IO_REGS("SWCHB(R)", mySWCHBReadBits, 0, false) // Timer registers (R/W) - const char* const writeNames[] = { "TIM1T", "TIM8T", "TIM64T", "T1024T" }; + static constexpr std::array writeNames = { + "TIM1T", "TIM8T", "TIM64T", "T1024T" + }; xpos = 10; ypos += 2*lineHeight; for(int row = 0; row < 4; ++row) { @@ -115,7 +117,9 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& lfont, addFocusWidget(myTimWrite); // Timer registers (RO) - const char* const readNames[] = { "INTIM", "TIMINT", "Total Clks", "INTIM Clks", "Divider" }; + static constexpr std::array readNames = { + "INTIM", "TIMINT", "Total Clks", "INTIM Clks", "Divider" + }; xpos = 10; ypos += myTimWrite->getHeight() + lineHeight / 2; for(int row = 0; row < 5; ++row) { @@ -141,7 +145,9 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& lfont, instance().console().rightController()); // TIA INPTx registers (R), left port - const char* const contLeftReadNames[] = { "INPT0", "INPT1", "INPT4" }; + static constexpr std::array contLeftReadNames = { + "INPT0", "INPT1", "INPT4" + }; xpos = col; ypos += myLeftControl->getHeight() + 2 * lineHeight; for(int row = 0; row < 3; ++row) { @@ -154,7 +160,9 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& lfont, myLeftINPT->setEditable(false); // TIA INPTx registers (R), right port - const char* const contRightReadNames[] = { "INPT2", "INPT3", "INPT5" }; + static constexpr std::array contRightReadNames = { + "INPT2", "INPT3", "INPT5" + }; xpos = col + myLeftControl->getWidth() + 15; for(int row = 0; row < 3; ++row) { @@ -353,25 +361,25 @@ void RiotWidget::handleCommand(CommandSender* sender, int cmd, int data, int id) switch(cmd) { case DataGridWidget::kItemDataChangedCmd: - switch(id) + if(id == kTimWriteID) { - case kTimWriteID: - switch(myTimWrite->getSelectedAddr()) - { - case kTim1TID: - riot.tim1T(myTimWrite->getSelectedValue()); - break; - case kTim8TID: - riot.tim8T(myTimWrite->getSelectedValue()); - break; - case kTim64TID: - riot.tim64T(myTimWrite->getSelectedValue()); - break; - case kTim1024TID: - riot.tim1024T(myTimWrite->getSelectedValue()); - break; - } - break; + switch(myTimWrite->getSelectedAddr()) + { + case kTim1TID: + riot.tim1T(myTimWrite->getSelectedValue()); + break; + case kTim8TID: + riot.tim8T(myTimWrite->getSelectedValue()); + break; + case kTim64TID: + riot.tim64T(myTimWrite->getSelectedValue()); + break; + case kTim1024TID: + riot.tim1024T(myTimWrite->getSelectedValue()); + break; + default: + break; + } } break; @@ -409,6 +417,8 @@ void RiotWidget::handleCommand(CommandSender* sender, int cmd, int data, int id) rport.setPin(Controller::DigitalPin::Four, value & 0b00001000); break; } + default: + break; } break; @@ -424,6 +434,8 @@ void RiotWidget::handleCommand(CommandSender* sender, int cmd, int data, int id) case kPauseID: handleConsole(); break; + default: + break; } break; @@ -438,6 +450,9 @@ void RiotWidget::handleCommand(CommandSender* sender, int cmd, int data, int id) case kTVTypeChanged: handleConsole(); break; + + default: + break; } } diff --git a/src/debugger/gui/RomListSettings.cxx b/src/debugger/gui/RomListSettings.cxx index 2be8c99fc..dce8e86b2 100644 --- a/src/debugger/gui/RomListSettings.cxx +++ b/src/debugger/gui/RomListSettings.cxx @@ -177,5 +177,7 @@ void RomListSettings::handleCommand(CommandSender* sender, int cmd, int data, in sendCommand(cmd, myUseRelocation->getState(), -1); break; } + default: + break; } } diff --git a/src/debugger/gui/TiaOutputWidget.cxx b/src/debugger/gui/TiaOutputWidget.cxx index 1ab2cc77f..f697f04c8 100644 --- a/src/debugger/gui/TiaOutputWidget.cxx +++ b/src/debugger/gui/TiaOutputWidget.cxx @@ -104,7 +104,7 @@ void TiaOutputWidget::saveSnapshot(int execDepth, const string& execPrefix) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void TiaOutputWidget::handleMouseDown(int x, int y, MouseButton b, int clickCount) { - if (b == MouseButton::LEFT) + if(b == MouseButton::LEFT) myZoom->setPos(x, y); // Grab right mouse button for command context menu else if(b == MouseButton::RIGHT) @@ -122,48 +122,41 @@ void TiaOutputWidget::handleCommand(CommandSender* sender, int cmd, int data, in { uInt32 startLine = instance().console().tia().startLine(); - switch(cmd) + if(cmd == ContextMenu::kItemSelectedCmd) { - case ContextMenu::kItemSelectedCmd: + const string& rmb = myMenu->getSelectedTag().toString(); + + if(rmb == "scanline") { - const string& rmb = myMenu->getSelectedTag().toString(); + ostringstream command; + int lines = myClickY + startLine - instance().console().tia().scanlines(); - if(rmb == "scanline") + if(lines < 0) + lines += instance().console().tia().scanlinesLastFrame(); + if(lines > 0) { - ostringstream command; - int lines = myClickY + startLine - instance().console().tia().scanlines(); - - if(lines < 0) - lines += instance().console().tia().scanlinesLastFrame(); - if(lines > 0) - { - command << "scanline #" << lines; - string message = instance().debugger().parser().run(command.str()); - instance().frameBuffer().showMessage(message); - } - } - else if(rmb == "bp") - { - ostringstream command; - int scanline = myClickY + startLine; - command << "breakif _scan==#" << scanline; + command << "scanline #" << lines; string message = instance().debugger().parser().run(command.str()); instance().frameBuffer().showMessage(message); } - else if(rmb == "zoom") - { - if(myZoom) - myZoom->setPos(myClickX, myClickY); - } - else if(rmb == "snap") - { - instance().debugger().parser().run("savesnap"); - } - break; } - - default: - break; + else if(rmb == "bp") + { + ostringstream command; + int scanline = myClickY + startLine; + command << "breakif _scan==#" << scanline; + string message = instance().debugger().parser().run(command.str()); + instance().frameBuffer().showMessage(message); + } + else if(rmb == "zoom") + { + if(myZoom) + myZoom->setPos(myClickX, myClickY); + } + else if(rmb == "snap") + { + instance().debugger().parser().run("savesnap"); + } } } diff --git a/src/debugger/gui/TiaWidget.cxx b/src/debugger/gui/TiaWidget.cxx index d3d2e090d..9f59f26f6 100644 --- a/src/debugger/gui/TiaWidget.cxx +++ b/src/debugger/gui/TiaWidget.cxx @@ -48,7 +48,9 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont, ButtonWidget* b = nullptr; // Color registers - const char* const regNames[] = { "COLUP0", "COLUP1", "COLUPF", "COLUBK" }; + static constexpr std::array regNames = { + "COLUP0", "COLUP1", "COLUPF", "COLUBK" + }; for(int row = 0; row < 4; ++row) { new StaticTextWidget(boss, lfont, xpos, ypos + row*lineHeight + 2, @@ -87,7 +89,9 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont, myFixedEnabled->setTarget(this); addFocusWidget(myFixedEnabled); - const char* const dbgLabels[] = { "P0", "P1", "PF", "BK", "M0", "M1", "BL", "HM" }; + static constexpr std::array dbgLabels = { + "P0", "P1", "PF", "BK", "M0", "M1", "BL", "HM" + }; for(uInt32 row = 0; row <= 3; ++row) { ypos += lineHeight; @@ -117,8 +121,8 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont, // Add all 15 collision bits (with labels) uInt32 cxclrY = 0; xpos -= 2*fontWidth + 5; ypos += lineHeight; - const char* const rowLabel[] = { "P0", "P1", "M0", "M1", "BL" }; - const char* const colLabel[] = { "PF", "BL", "M1", "M0", "P1" }; + static constexpr std::array rowLabel = { "P0", "P1", "M0", "M1", "BL" }; + static constexpr std::array colLabel = { "PF", "BL", "M1", "M0", "P1" }; uInt32 lwidth = 2*fontWidth, collX = xpos + lwidth + 5, collY = ypos, idx = 0; for(uInt32 row = 0; row < 5; ++row) { @@ -534,7 +538,9 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& sf = instance().frameBuffer().smallFont(); const int sfWidth = sf.getMaxCharWidth(), sfHeight = sf.getFontHeight(); - const char* const bitNames[] = { "0", "1", "2", "3", "4", "5", "6", "7" }; + static constexpr std::array bitNames = { + "0", "1", "2", "3", "4", "5", "6", "7" + }; // PF0 xpos = 10; ypos += lineHeight + sfHeight + 6; @@ -1200,5 +1206,8 @@ void TiaWidget::changeColorRegs() instance().debugger().tiaDebug().coluBK(value); myCOLUBKColor->setColor(value); break; + + default: + break; } } diff --git a/src/debugger/gui/ToggleWidget.cxx b/src/debugger/gui/ToggleWidget.cxx index 93847709f..bdeae4019 100644 --- a/src/debugger/gui/ToggleWidget.cxx +++ b/src/debugger/gui/ToggleWidget.cxx @@ -214,14 +214,12 @@ bool ToggleWidget::handleKeyDown(StellaKey key, StellaMod mod) void ToggleWidget::handleCommand(CommandSender* sender, int cmd, int data, int id) { - switch (cmd) + if (cmd == GuiObject::kSetPositionCmd) { - case GuiObject::kSetPositionCmd: - if (_selectedItem != data) - { - _selectedItem = data; - setDirty(); - } - break; + if (_selectedItem != data) + { + _selectedItem = data; + setDirty(); + } } } diff --git a/src/emucore/AmigaMouse.hxx b/src/emucore/AmigaMouse.hxx index eee660fad..69a0ff16e 100644 --- a/src/emucore/AmigaMouse.hxx +++ b/src/emucore/AmigaMouse.hxx @@ -43,13 +43,17 @@ class AmigaMouse : public PointingDevice protected: uInt8 ioPortA(uInt8 countH, uInt8 countV, uInt8, uInt8) override { - static constexpr uInt32 ourTableH[4] = { 0b0000, 0b1000, 0b1010, 0b0010 }; - static constexpr uInt32 ourTableV[4] = { 0b0000, 0b0100, 0b0101, 0b0001 }; + static constexpr std::array ourTableH = { + 0b0000, 0b1000, 0b1010, 0b0010 + }; + static constexpr std::array ourTableV = { + 0b0000, 0b0100, 0b0101, 0b0001 + }; return ourTableH[countH] | ourTableV[countV]; } - static constexpr float trackballSensitivity = 0.8f; + static constexpr float trackballSensitivity = 0.8F; }; #endif // AMIGAMOUSE_HXX diff --git a/src/emucore/AtariMouse.hxx b/src/emucore/AtariMouse.hxx index 7b1771153..134f607e7 100644 --- a/src/emucore/AtariMouse.hxx +++ b/src/emucore/AtariMouse.hxx @@ -43,13 +43,17 @@ class AtariMouse : public PointingDevice protected: uInt8 ioPortA(uInt8 countH, uInt8 countV, uInt8, uInt8) override { - static constexpr uInt32 ourTableH[4] = { 0b0000, 0b0001, 0b0011, 0b0010 }; - static constexpr uInt32 ourTableV[4] = { 0b0000, 0b0100, 0b1100, 0b1000 }; + static constexpr std::array ourTableH = { + 0b0000, 0b0001, 0b0011, 0b0010 + }; + static constexpr std::array ourTableV = { + 0b0000, 0b0100, 0b1100, 0b1000 + }; return ourTableH[countH] | ourTableV[countV]; } - static constexpr float trackballSensitivity = 0.8f; + static constexpr float trackballSensitivity = 0.8F; }; #endif // ATARIMOUSE_HXX diff --git a/src/emucore/CartBUS.cxx b/src/emucore/CartBUS.cxx index 09572f083..4f87e5b47 100644 --- a/src/emucore/CartBUS.cxx +++ b/src/emucore/CartBUS.cxx @@ -177,6 +177,8 @@ inline void CartridgeBUS::callFunction(uInt8 value) } } break; + default: + break; } } @@ -534,6 +536,9 @@ uInt32 CartridgeBUS::thumbCallback(uInt8 function, uInt32 value1, uInt32 value2) case 3: myMusicWaveformSize[value1] = value2; break; + + default: + break; } return 0; diff --git a/src/emucore/CartCDF.cxx b/src/emucore/CartCDF.cxx index a89ea4013..d14d3483c 100644 --- a/src/emucore/CartCDF.cxx +++ b/src/emucore/CartCDF.cxx @@ -187,6 +187,8 @@ inline void CartridgeCDF::callFunction(uInt8 value) } } break; + default: + break; } } diff --git a/src/emucore/CartDPC.cxx b/src/emucore/CartDPC.cxx index dc266df23..c3faaf0e4 100644 --- a/src/emucore/CartDPC.cxx +++ b/src/emucore/CartDPC.cxx @@ -84,7 +84,7 @@ inline void CartridgeDPC::clockRandomNumberGenerator() { // Table for computing the input bit of the random number generator's // shift register (it's the NOT of the EOR of four bits) - static constexpr uInt8 f[16] = { + static constexpr std::array f = { 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1 }; @@ -186,7 +186,7 @@ uInt8 CartridgeDPC::peek(uInt16 address) // No, it's a music read else { - static constexpr uInt8 musicAmplitudes[8] = { + static constexpr std::array musicAmplitudes = { 0x00, 0x04, 0x05, 0x09, 0x06, 0x0a, 0x0b, 0x0f }; diff --git a/src/emucore/CartDPCPlus.cxx b/src/emucore/CartDPCPlus.cxx index 3bc72dc02..7d0b884ef 100644 --- a/src/emucore/CartDPCPlus.cxx +++ b/src/emucore/CartDPCPlus.cxx @@ -205,7 +205,8 @@ inline void CartridgeDPCPlus::callFunction(uInt8 value) } } break; - // reserved + default: // reserved + break; } } @@ -336,6 +337,8 @@ uInt8 CartridgeDPCPlus::peek(uInt16 address) case 0x06: // reserved case 0x07: // reserved break; + default: + break; } break; } @@ -465,6 +468,8 @@ bool CartridgeDPCPlus::poke(uInt16 address, uInt8 value) case 0x07: // WAVEFORM2 myMusicWaveforms[index - 5] = value & 0x7f; break; + default: + break; } break; @@ -537,9 +542,7 @@ bool CartridgeDPCPlus::poke(uInt16 address, uInt8 value) } default: - { break; - } } } else diff --git a/src/emucore/DefProps.hxx b/src/emucore/DefProps.hxx index f4155c10b..59da0cb7b 100644 --- a/src/emucore/DefProps.hxx +++ b/src/emucore/DefProps.hxx @@ -25,9 +25,9 @@ regenerated and the application recompiled. */ -#define DEF_PROPS_SIZE 3496 +static constexpr uInt32 DEF_PROPS_SIZE = 3496; -static const char* const DefProps[DEF_PROPS_SIZE][21] = { +static constexpr BSPF::array2D DefProps = {{ { "000509d1ed2b8d30a9d94be1b3b5febb", "Greg Zumwalt", "", "Jungle Jane (2003) (Greg Zumwalt) (Hack)", "Hack of Pitfall!", "Hack", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "0060a89b4c956b9c703a59b181cb3018", "CommaVid, Irwin Gaines - Ariola", "CM-008 - 712 008-720", "Cakewalk (1983) (CommaVid) (PAL)", "AKA Alarm in der Backstube", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "007d18dedc1f0565f09c42aa61a6f585", "CCE", "C-843", "Worm War I (1983) (CCE)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, @@ -3524,6 +3524,6 @@ static const char* const DefProps[DEF_PROPS_SIZE][21] = { { "ffdc0eb3543404eb4c353fbdddfa33b6", "CCE", "C-827", "Chopper Command (1983) (CCE) [a]", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "ffe51989ba6da2c6ae5a12d277862e16", "Atari - Sears", "CX2627 - 6-99841", "Human Cannonball (1979) (Atari) (4K)", "AKA Cannon Man", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "ffebb0070689b9d322687edd9c0a2bae", "", "", "Spitfire Attack (1983) (Milton Bradley) [h1]", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" } -}; +}}; #endif diff --git a/src/emucore/Driving.cxx b/src/emucore/Driving.cxx index 6dadc22b3..6332bdea6 100644 --- a/src/emucore/Driving.cxx +++ b/src/emucore/Driving.cxx @@ -120,7 +120,7 @@ void Driving::update() } // Gray codes for rotation - static constexpr uInt8 graytable[] = { 0x03, 0x01, 0x00, 0x02 }; + static constexpr std::array graytable = { 0x03, 0x01, 0x00, 0x02 }; // Determine which bits are set uInt8 gray = graytable[myGrayIndex]; diff --git a/src/emucore/EventHandler.cxx b/src/emucore/EventHandler.cxx index 94d7cfb14..dcb2cf696 100644 --- a/src/emucore/EventHandler.cxx +++ b/src/emucore/EventHandler.cxx @@ -1485,19 +1485,19 @@ Event::Type EventHandler::eventAtIndex(int idx, Event::Group group) const { int index = getActionListIndex(idx, group); - switch(group) + if(group == Event::Group::Menu) { - case Event::Group::Menu: - if(index < 0 || index >= int(ourMenuActionList.size())) - return Event::NoType; - else - return ourMenuActionList[index].event; - - default: - if(index < 0 || index >= int(ourEmulActionList.size())) - return Event::NoType; - else - return ourEmulActionList[index].event; + if(index < 0 || index >= int(ourMenuActionList.size())) + return Event::NoType; + else + return ourMenuActionList[index].event; + } + else + { + if(index < 0 || index >= int(ourEmulActionList.size())) + return Event::NoType; + else + return ourEmulActionList[index].event; } } @@ -1506,19 +1506,19 @@ string EventHandler::actionAtIndex(int idx, Event::Group group) const { int index = getActionListIndex(idx, group); - switch(group) + if(group == Event::Group::Menu) { - case Event::Group::Menu: - if(index < 0 || index >= int(ourMenuActionList.size())) - return EmptyString; - else - return ourMenuActionList[index].action; - - default: - if(index < 0 || index >= int(ourEmulActionList.size())) - return EmptyString; - else - return ourEmulActionList[index].action; + if(index < 0 || index >= int(ourMenuActionList.size())) + return EmptyString; + else + return ourMenuActionList[index].action; + } + else + { + if(index < 0 || index >= int(ourEmulActionList.size())) + return EmptyString; + else + return ourEmulActionList[index].action; } } @@ -1527,19 +1527,19 @@ string EventHandler::keyAtIndex(int idx, Event::Group group) const { int index = getActionListIndex(idx, group); - switch(group) + if(group == Event::Group::Menu) { - case Event::Group::Menu: - if(index < 0 || index >= int(ourMenuActionList.size())) - return EmptyString; - else - return ourMenuActionList[index].key; - - default: - if(index < 0 || index >= int(ourEmulActionList.size())) - return EmptyString; - else - return ourEmulActionList[index].key; + if(index < 0 || index >= int(ourMenuActionList.size())) + return EmptyString; + else + return ourMenuActionList[index].key; + } + else + { + if(index < 0 || index >= int(ourEmulActionList.size())) + return EmptyString; + else + return ourEmulActionList[index].key; } } diff --git a/src/emucore/FSNode.cxx b/src/emucore/FSNode.cxx index 19bffb38c..1a94ad191 100644 --- a/src/emucore/FSNode.cxx +++ b/src/emucore/FSNode.cxx @@ -21,11 +21,6 @@ #include "FSNodeFactory.hxx" #include "FSNode.hxx" -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -FilesystemNode::FilesystemNode() -{ -} - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - FilesystemNode::FilesystemNode(const AbstractFSNodePtr& realNode) : _realNode(realNode) diff --git a/src/emucore/FSNode.hxx b/src/emucore/FSNode.hxx index 80922cf37..3019bcdbd 100644 --- a/src/emucore/FSNode.hxx +++ b/src/emucore/FSNode.hxx @@ -81,7 +81,7 @@ class FilesystemNode * with this node, path-related operations (i.e. exists(), isDirectory(), * getPath()) will always return false or raise an assertion. */ - FilesystemNode(); + FilesystemNode() = default; /** * Create a new FilesystemNode referring to the specified path. This is diff --git a/src/emucore/KidVid.cxx b/src/emucore/KidVid.cxx index 77a280122..3c74b77d9 100644 --- a/src/emucore/KidVid.cxx +++ b/src/emucore/KidVid.cxx @@ -281,13 +281,13 @@ void KidVid::getNextSampleByte() } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -const uInt8 KidVid::ourKVBlocks[6] = { +const std::array KidVid::ourKVBlocks = { 2+40, 2+21, 2+35, /* Smurfs tapes 3, 1, 2 */ 42+60, 42+78, 42+60 /* BBears tapes 1, 2, 3 (40 extra blocks for intro) */ }; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -const uInt8 KidVid::ourKVData[6*8] = { +const std::array KidVid::ourKVData = { /* KVData44 */ 0x7b, // 0111 1011b ; (1)0 0x1e, // 0001 1110b ; 1 @@ -354,7 +354,7 @@ const uInt8 KidVid::ourKVData[6*8] = { }; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -const uInt8 KidVid::ourSongPositions[44+38+42+62+80+62] = { +const std::array KidVid::ourSongPositions = { /* kvs1 44 */ 11, 12+0x80, 13+0x80, 14, 15+0x80, 16, 8+0x80, 17, 18+0x80, 19, 20+0x80, 21, 8+0x80, 22, 15+0x80, 23, 18+0x80, 14, 20+0x80, 16, 18+0x80, @@ -390,7 +390,7 @@ const uInt8 KidVid::ourSongPositions[44+38+42+62+80+62] = { }; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -const uInt32 KidVid::ourSongStart[104] = { +const std::array KidVid::ourSongStart = { /* kvshared */ 44, /* Welcome + intro Berenstain Bears */ 980829, /* boulders in the road */ diff --git a/src/emucore/KidVid.hxx b/src/emucore/KidVid.hxx index d0593c42f..30927c942 100644 --- a/src/emucore/KidVid.hxx +++ b/src/emucore/KidVid.hxx @@ -76,12 +76,14 @@ class KidVid : public Controller void getNextSampleByte(); private: - enum { + static constexpr uInt32 KVSMURFS = 0x44, KVBBEARS = 0x48, - KVBLOCKS = 6, /* number of bytes / block */ - KVBLOCKBITS = KVBLOCKS*8 /* number of bits / block */ - }; + KVBLOCKS = 6, // number of bytes / block + KVBLOCKBITS = KVBLOCKS*8, // number of bits / block + SONG_POS_SIZE = 44+38+42+62+80+62, + SONG_START_SIZE = 104 + ; // Whether the KidVid device is enabled (only for games that it // supports, and if it's plugged into the right port @@ -103,11 +105,11 @@ class KidVid : public Controller uInt32 myIdx, myBlock, myBlockIdx; // Number of blocks and data on tape - static const uInt8 ourKVBlocks[6]; - static const uInt8 ourKVData[6*8]; + static const std::array ourKVBlocks; + static const std::array ourKVData; - static const uInt8 ourSongPositions[44+38+42+62+80+62]; - static const uInt32 ourSongStart[104]; + static const std::array ourSongPositions; + static const std::array ourSongStart; private: // Following constructors and assignment operators not supported diff --git a/src/emucore/M6532.cxx b/src/emucore/M6532.cxx index b58a9f15c..e0eb7ac11 100644 --- a/src/emucore/M6532.cxx +++ b/src/emucore/M6532.cxx @@ -43,7 +43,7 @@ M6532::M6532(const ConsoleIO& console, const Settings& settings) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void M6532::reset() { - static constexpr uInt8 RAM_7800[128] = { + static constexpr std::array RAM_7800 = { 0xA9, 0x00, 0xAA, 0x85, 0x01, 0x95, 0x03, 0xE8, 0xE0, 0x2A, 0xD0, 0xF9, 0x85, 0x02, 0xA9, 0x04, 0xEA, 0x30, 0x23, 0xA2, 0x04, 0xCA, 0x10, 0xFD, 0x9A, 0x8D, 0x10, 0x01, 0x20, 0xCB, 0x04, 0x20, 0xCB, 0x04, 0x85, 0x11, 0x85, 0x1B, 0x85, 0x1C, 0x85, 0x0F, 0xEA, 0x85, 0x02, 0xA9, 0x00, 0xEA, @@ -57,9 +57,10 @@ void M6532::reset() // Initialize the 128 bytes of memory bool devSettings = mySettings.getBool("dev.settings"); if(mySettings.getString(devSettings ? "dev.console" : "plr.console") == "7800") - std::copy_n(RAM_7800, 128, myRAM.begin()); + std::copy_n(RAM_7800.begin(), RAM_7800.size(), myRAM.begin()); else if(mySettings.getBool(devSettings ? "dev.ramrandom" : "plr.ramrandom")) - for(uInt32 t = 0; t < 128; ++t) myRAM[t] = mySystem->randGenerator().next(); + for(size_t t = 0; t < myRAM.size(); ++t) + myRAM[t] = mySystem->randGenerator().next(); else myRAM.fill(0); @@ -312,7 +313,7 @@ bool M6532::poke(uInt16 addr, uInt8 value) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void M6532::setTimerRegister(uInt8 value, uInt8 interval) { - static constexpr uInt32 divider[] = { 1, 8, 64, 1024 }; + static constexpr std::array divider = { 1, 8, 64, 1024 }; myDivider = divider[interval]; myOutTimer[interval] = value; diff --git a/src/emucore/PointingDevice.cxx b/src/emucore/PointingDevice.cxx index 8b83599f4..dfe357f48 100644 --- a/src/emucore/PointingDevice.cxx +++ b/src/emucore/PointingDevice.cxx @@ -115,7 +115,7 @@ bool PointingDevice::setMouseControl( void PointingDevice::setSensitivity(int sensitivity) { BSPF::clamp(sensitivity, 1, 20, 10); - TB_SENSITIVITY = sensitivity / 10.0f; + TB_SENSITIVITY = sensitivity / 10.0F; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/emucore/PropsSet.cxx b/src/emucore/PropsSet.cxx index c22330b38..3867fbeed 100644 --- a/src/emucore/PropsSet.cxx +++ b/src/emucore/PropsSet.cxx @@ -194,7 +194,7 @@ void PropertiesSet::print() const // This is fine, since a duplicate in the built-in list means it should // be overrided anyway (and insertion shouldn't be done) Properties properties; - for(int i = 0; i < DEF_PROPS_SIZE; ++i) + for(uInt32 i = 0; i < DEF_PROPS_SIZE; ++i) { properties.setDefaults(); for(uInt8 p = 0; p < static_cast(PropType::NumTypes); ++p) diff --git a/src/emucore/Settings.cxx b/src/emucore/Settings.cxx index 4d1287bd8..2a1844e0c 100644 --- a/src/emucore/Settings.cxx +++ b/src/emucore/Settings.cxx @@ -665,7 +665,8 @@ void Settings::migrateOne() #if defined BSPF_MACOS || defined DARWIN setPermanent("video", ""); #endif - + break; + default: break; } diff --git a/src/emucore/TIASurface.cxx b/src/emucore/TIASurface.cxx index 852610a97..e99df7f7f 100644 --- a/src/emucore/TIASurface.cxx +++ b/src/emucore/TIASurface.cxx @@ -201,7 +201,7 @@ uInt32 TIASurface::enableScanlines(int relative, int absolute) if(relative == 0) attr.blendalpha = absolute; else attr.blendalpha += relative; attr.blendalpha = std::max(0, Int32(attr.blendalpha)); - attr.blendalpha = std::min(100u, attr.blendalpha); + attr.blendalpha = std::min(100U, attr.blendalpha); mySLineSurface->applyAttributes(); diff --git a/src/emucore/Thumbulator.cxx b/src/emucore/Thumbulator.cxx index 8fed8b360..a9d0834af 100644 --- a/src/emucore/Thumbulator.cxx +++ b/src/emucore/Thumbulator.cxx @@ -58,7 +58,7 @@ Thumbulator::Thumbulator(const uInt16* rom_ptr, uInt16* ram_ptr, uInt16 rom_size Cartridge* cartridge) : rom(rom_ptr), romSize(rom_size), - decodedRom(make_unique(romSize / 2)), + decodedRom(make_unique(romSize / 2)), // NOLINT ram(ram_ptr), T1TCR(0), T1TC(0), @@ -316,6 +316,9 @@ void Thumbulator::write32(uInt32 addr, uInt32 data) case 0xE000E01C: systick_calibrate = data & 0x00FFFFFF; break; + + default: + break; } return; @@ -335,6 +338,9 @@ void Thumbulator::write32(uInt32 addr, uInt32 data) case 0x20: statusMsg << Base::HEX8 << data << endl; return; + + default: + break; } #endif return; @@ -940,7 +946,7 @@ int Thumbulator::execute() rb <<= 2; DO_DISS(statusMsg << "add r" << dec << rd << ",PC,#0x" << Base::HEX2 << rb << endl); ra = read_register(15); - rc = (ra & (~3u)) + rb; + rc = (ra & (~3U)) + rb; write_register(rd, rc); return 0; } @@ -1693,7 +1699,7 @@ int Thumbulator::execute() DO_DISS(statusMsg << "ldrb r" << dec << rd << ",[r" << dec << rn << ",#0x" << Base::HEX2 << rb << "]" << endl); rb = read_register(rn) + rb; #ifndef UNSAFE_OPTIMIZATIONS - rc = read16(rb & (~1u)); + rc = read16(rb & (~1U)); #else rc = read16(rb); #endif @@ -1716,7 +1722,7 @@ int Thumbulator::execute() DO_DISS(statusMsg << "ldrb r" << dec << rd << ",[r" << dec << rn << ",r" << dec << rm << "]" << endl); rb = read_register(rn) + read_register(rm); #ifndef UNSAFE_OPTIMIZATIONS - rc = read16(rb & (~1u)); + rc = read16(rb & (~1U)); #else rc = read16(rb); #endif @@ -1761,7 +1767,7 @@ int Thumbulator::execute() DO_DISS(statusMsg << "ldrsb r" << dec << rd << ",[r" << dec << rn << ",r" << dec << rm << "]" << endl); rb = read_register(rn) + read_register(rm); #ifndef UNSAFE_OPTIMIZATIONS - rc = read16(rb & (~1u)); + rc = read16(rb & (~1U)); #else rc = read16(rb); #endif @@ -2286,7 +2292,7 @@ int Thumbulator::execute() rb = read_register(rn) + rb; rc = read_register(rd); #ifndef UNSAFE_OPTIMIZATIONS - ra = read16(rb & (~1u)); + ra = read16(rb & (~1U)); #else ra = read16(rb); #endif @@ -2300,7 +2306,7 @@ int Thumbulator::execute() ra &= 0xFF00; ra |= rc & 0x00FF; } - write16(rb & (~1u), ra & 0xFFFF); + write16(rb & (~1U), ra & 0xFFFF); return 0; } @@ -2313,7 +2319,7 @@ int Thumbulator::execute() rb = read_register(rn) + read_register(rm); rc = read_register(rd); #ifndef UNSAFE_OPTIMIZATIONS - ra = read16(rb & (~1u)); + ra = read16(rb & (~1U)); #else ra = read16(rb); #endif @@ -2327,7 +2333,7 @@ int Thumbulator::execute() ra &= 0xFF00; ra |= rc & 0x00FF; } - write16(rb & (~1u), ra & 0xFFFF); + write16(rb & (~1U), ra & 0xFFFF); return 0; } diff --git a/src/emucore/TrakBall.hxx b/src/emucore/TrakBall.hxx index 34de166f3..3bae9e7da 100644 --- a/src/emucore/TrakBall.hxx +++ b/src/emucore/TrakBall.hxx @@ -43,14 +43,18 @@ class TrakBall : public PointingDevice protected: uInt8 ioPortA(uInt8 countH, uInt8 countV, uInt8 left, uInt8 down) override { - static constexpr uInt32 ourTableH[2][2] = {{ 0b00, 0b01 }, { 0b10, 0b11 }}; - static constexpr uInt32 ourTableV[2][2] = {{ 0b0100, 0b0000 }, { 0b1100, 0b1000 }}; + static constexpr BSPF::array2D ourTableH = {{ + { 0b00, 0b01 }, { 0b10, 0b11 } + }}; + static constexpr BSPF::array2D ourTableV = {{ + { 0b0100, 0b0000 }, { 0b1100, 0b1000 } + }}; return ourTableH[countH & 0b1][left] | ourTableV[countV & 0b1][down]; } // 50% of Atari and Amiga mouse - static constexpr float trackballSensitivity = 0.4f; + static constexpr float trackballSensitivity = 0.4F; }; #endif // TRAKBALL_HXX diff --git a/src/emucore/tia/Ball.cxx b/src/emucore/tia/Ball.cxx index 3fb95449f..631bc8a6a 100644 --- a/src/emucore/tia/Ball.cxx +++ b/src/emucore/tia/Ball.cxx @@ -84,7 +84,7 @@ void Ball::resbl(uInt8 counter) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void Ball::ctrlpf(uInt8 value) { - static constexpr uInt8 ourWidths[] = {1, 2, 4, 8}; + static constexpr std::array ourWidths = { 1, 2, 4, 8 }; const uInt8 newWidth = ourWidths[(value & 0x30) >> 4]; diff --git a/src/gui/ConsoleBFont.hxx b/src/gui/ConsoleBFont.hxx index 00dfba4bf..928e98648 100644 --- a/src/gui/ConsoleBFont.hxx +++ b/src/gui/ConsoleBFont.hxx @@ -40,7 +40,7 @@ namespace GUI { // Font character bitmap data. -static const uInt16 consoleB_font_bits[] = { +static const uInt16 consoleB_font_bits[] = { // NOLINT : too complicated to convert /* MODIFIED diff --git a/src/gui/ConsoleFont.hxx b/src/gui/ConsoleFont.hxx index e3ddd3748..1fd55fc5d 100644 --- a/src/gui/ConsoleFont.hxx +++ b/src/gui/ConsoleFont.hxx @@ -40,7 +40,7 @@ namespace GUI { // Font character bitmap data. -static const uInt16 console_font_bits[] = { +static const uInt16 console_font_bits[] = { // NOLINT : too complicated to convert /* MODIFIED Character 29 (0x1d): diff --git a/src/gui/ConsoleMediumBFont.hxx b/src/gui/ConsoleMediumBFont.hxx index 69c928d2f..f69b97009 100644 --- a/src/gui/ConsoleMediumBFont.hxx +++ b/src/gui/ConsoleMediumBFont.hxx @@ -40,7 +40,7 @@ namespace GUI { // Font character bitmap data. -static const uInt16 consoleMediumB_font_bits[] = { +static const uInt16 consoleMediumB_font_bits[] = { // NOLINT : too complicated to convert /* MODIFIED Character 29 (0x1d): ellipsis diff --git a/src/gui/ConsoleMediumFont.hxx b/src/gui/ConsoleMediumFont.hxx index bf22eb775..f9d3a6b75 100644 --- a/src/gui/ConsoleMediumFont.hxx +++ b/src/gui/ConsoleMediumFont.hxx @@ -40,7 +40,7 @@ namespace GUI { // Font character bitmap data. -static const uInt16 consoleMedium_font_bits[] = { +static const uInt16 consoleMedium_font_bits[] = { // NOLINT : too complicated to convert /* MODIFIED Character 29 (0x1d): ellipsis diff --git a/src/gui/StellaMediumFont.hxx b/src/gui/StellaMediumFont.hxx index f43d0f35d..82fce5cbd 100644 --- a/src/gui/StellaMediumFont.hxx +++ b/src/gui/StellaMediumFont.hxx @@ -40,7 +40,7 @@ namespace GUI { // Font character bitmap data. -static const uInt16 stellaMedium_font_bits[] = { +static const uInt16 stellaMedium_font_bits[] = { // NOLINT : too complicated to convert /* MODIFIED diff --git a/src/tools/convbdf.c b/src/tools/convbdf.c index d175a6836..b5427a494 100644 --- a/src/tools/convbdf.c +++ b/src/tools/convbdf.c @@ -799,7 +799,7 @@ int gen_c_source(struct font* pf, char *path) "namespace GUI {\n" "\n" "// Font character bitmap data.\n" - "static const uInt16 %s_font_bits[] = {\n" + "static const uInt16 %s_font_bits[] = { // NOLINT : too complicated to convert\n" }; ofp = fopen(path, "w"); diff --git a/src/tools/create_props.pl b/src/tools/create_props.pl index 156678ae8..96f7a37d5 100755 --- a/src/tools/create_props.pl +++ b/src/tools/create_props.pl @@ -66,9 +66,9 @@ print OUTFILE " located in the src/tools directory. All properties changes\n"; print OUTFILE " should be made in stella.pro, and then this file should be\n"; print OUTFILE " regenerated and the application recompiled.\n"; print OUTFILE "*/\n"; -print OUTFILE "\n#define DEF_PROPS_SIZE " . $setsize; +print OUTFILE "\nstatic constexpr uInt32 DEF_PROPS_SIZE = " . $setsize . ";"; print OUTFILE "\n\n"; -print OUTFILE "static const char* const DefProps[DEF_PROPS_SIZE][" . $typesize . "] = {\n"; +print OUTFILE "static constexpr BSPF::array2D DefProps = {{\n"; # Walk the hash map and print each item in order of md5sum my $idx = 0; @@ -83,7 +83,7 @@ for my $key ( sort keys %propset ) $idx++; } -print OUTFILE "};\n"; +print OUTFILE "}};\n"; print OUTFILE "\n"; print OUTFILE "#endif\n"; diff --git a/src/yacc/YaccParser.cxx b/src/yacc/YaccParser.cxx index 0169978a6..a317f0396 100644 --- a/src/yacc/YaccParser.cxx +++ b/src/yacc/YaccParser.cxx @@ -251,7 +251,7 @@ TiaMethod getTiaSpecial(char* ch) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - int yylex() { - static char idbuf[255]; + static char idbuf[255]; // NOLINT (will be rewritten soon) char o, p; yylval.val = 0; while(*c != '\0') {