diff --git a/src/cheat/CheatManager.cxx b/src/cheat/CheatManager.cxx index 62834abb2..2a2eeb7e1 100644 --- a/src/cheat/CheatManager.cxx +++ b/src/cheat/CheatManager.cxx @@ -28,7 +28,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CheatManager::CheatManager(OSystem& osystem) - : myOSystem(osystem) + : myOSystem{osystem} { } diff --git a/src/cheat/CheetahCheat.cxx b/src/cheat/CheetahCheat.cxx index eb19e8843..88c1e1fa1 100644 --- a/src/cheat/CheetahCheat.cxx +++ b/src/cheat/CheetahCheat.cxx @@ -23,9 +23,9 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CheetahCheat::CheetahCheat(OSystem& os, const string& name, const string& code) : Cheat(os, name, code), - address(0xf000 + unhex(code.substr(0, 3))), - value(uInt8(unhex(code.substr(3, 2)))), - count(uInt8(unhex(code.substr(5, 1)) + 1)) + address{uInt16(0xf000 + unhex(code.substr(0, 3)))}, + value{uInt8(unhex(code.substr(3, 2)))}, + count{uInt8(unhex(code.substr(5, 1)) + 1)} { // Back up original data; we need this if the cheat is ever disabled for(int i = 0; i < count; ++i) diff --git a/src/cheat/RamCheat.cxx b/src/cheat/RamCheat.cxx index 81ff4b560..41297d798 100644 --- a/src/cheat/RamCheat.cxx +++ b/src/cheat/RamCheat.cxx @@ -25,8 +25,8 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - RamCheat::RamCheat(OSystem& os, const string& name, const string& code) : Cheat(os, name, code), - address(uInt16(unhex(myCode.substr(0, 2)))), - value(uInt8(unhex(myCode.substr(2, 2)))) + address{uInt16(unhex(myCode.substr(0, 2)))}, + value{uInt8(unhex(myCode.substr(2, 2)))} { } diff --git a/src/common/AudioQueue.cxx b/src/common/AudioQueue.cxx index b50bdd03e..9323fe4af 100644 --- a/src/common/AudioQueue.cxx +++ b/src/common/AudioQueue.cxx @@ -22,10 +22,10 @@ using std::lock_guard; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AudioQueue::AudioQueue(uInt32 fragmentSize, uInt32 capacity, bool isStereo) - : myFragmentSize(fragmentSize), - myIsStereo(isStereo), - myFragmentQueue(capacity), - myAllFragments(capacity + 2) + : myFragmentSize{fragmentSize}, + myIsStereo{isStereo}, + myFragmentQueue{capacity}, + myAllFragments{capacity + 2} { const uInt8 sampleSize = myIsStereo ? 2 : 1; @@ -48,7 +48,7 @@ uInt32 AudioQueue::capacity() const } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -uInt32 AudioQueue::size() +uInt32 AudioQueue::size() const { lock_guard guard(myMutex); diff --git a/src/common/AudioQueue.hxx b/src/common/AudioQueue.hxx index e07d09536..3ce4f031c 100644 --- a/src/common/AudioQueue.hxx +++ b/src/common/AudioQueue.hxx @@ -55,7 +55,7 @@ class AudioQueue /** Size getter. */ - uInt32 size(); + uInt32 size() const; /** Stereo / mono getter. @@ -120,7 +120,7 @@ class AudioQueue uInt32 myNextFragment{0}; // We need a mutex for thread safety. - std::mutex myMutex; + mutable std::mutex myMutex; // The first (empty) enqueue call returns this fragment. Int16* myFirstFragmentForEnqueue{nullptr}; diff --git a/src/common/AudioSettings.cxx b/src/common/AudioSettings.cxx index 6f67d3d0a..04508a1a0 100644 --- a/src/common/AudioSettings.cxx +++ b/src/common/AudioSettings.cxx @@ -43,7 +43,7 @@ namespace { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AudioSettings::AudioSettings(Settings& settings) - : mySettings(settings) + : mySettings{settings} { setPreset(normalizedPreset(mySettings.getInt(SETTING_PRESET))); } diff --git a/src/common/AudioSettings.hxx b/src/common/AudioSettings.hxx index 1e9f0477f..d946f204e 100644 --- a/src/common/AudioSettings.hxx +++ b/src/common/AudioSettings.hxx @@ -129,13 +129,13 @@ class AudioSettings Settings& mySettings; - Preset myPreset; + Preset myPreset{Preset::custom}; uInt32 myPresetSampleRate{0}; uInt32 myPresetFragmentSize{0}; uInt32 myPresetBufferSize{0}; uInt32 myPresetHeadroom{0}; - ResamplingQuality myPresetResamplingQuality; + ResamplingQuality myPresetResamplingQuality{ResamplingQuality::nearestNeightbour}; bool myIsPersistent{true}; }; diff --git a/src/common/EventHandlerSDL2.cxx b/src/common/EventHandlerSDL2.cxx index 86d4dad89..f03fb1728 100644 --- a/src/common/EventHandlerSDL2.cxx +++ b/src/common/EventHandlerSDL2.cxx @@ -23,7 +23,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - EventHandlerSDL2::EventHandlerSDL2(OSystem& osystem) - : EventHandler(osystem) + : EventHandler{osystem} { ASSERT_MAIN_THREAD; diff --git a/src/common/FBBackendSDL2.cxx b/src/common/FBBackendSDL2.cxx index 643c099e9..7095cc273 100644 --- a/src/common/FBBackendSDL2.cxx +++ b/src/common/FBBackendSDL2.cxx @@ -31,7 +31,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - FBBackendSDL2::FBBackendSDL2(OSystem& osystem) - : myOSystem(osystem) + : myOSystem{osystem} { ASSERT_MAIN_THREAD; diff --git a/src/common/FBSurfaceSDL2.cxx b/src/common/FBSurfaceSDL2.cxx index 7f0ddb7d7..4b3b674c8 100644 --- a/src/common/FBSurfaceSDL2.cxx +++ b/src/common/FBSurfaceSDL2.cxx @@ -45,8 +45,8 @@ FBSurfaceSDL2::FBSurfaceSDL2(FBBackendSDL2& backend, uInt32 width, uInt32 height, ScalingInterpolation inter, const uInt32* staticData) - : myBackend(backend), - myInterpolationMode(inter) + : myBackend{backend}, + myInterpolationMode{inter} { createSurface(width, height, staticData); } diff --git a/src/common/FSNodeZIP.cxx b/src/common/FSNodeZIP.cxx index 7bd88efc0..9edc19beb 100644 --- a/src/common/FSNodeZIP.cxx +++ b/src/common/FSNodeZIP.cxx @@ -94,8 +94,8 @@ FilesystemNodeZIP::FilesystemNodeZIP(const string& p) FilesystemNodeZIP::FilesystemNodeZIP( const string& zipfile, const string& virtualpath, const AbstractFSNodePtr& realnode, bool isdir) - : _isDirectory(isdir), - _isFile(!isdir) + : _isDirectory{isdir}, + _isFile{!isdir} { setFlags(zipfile, virtualpath, realnode); } diff --git a/src/common/FpsMeter.cxx b/src/common/FpsMeter.cxx index 878a42ae0..b9996a16e 100644 --- a/src/common/FpsMeter.cxx +++ b/src/common/FpsMeter.cxx @@ -21,7 +21,7 @@ using namespace std::chrono; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - FpsMeter::FpsMeter(uInt32 queueSize) - : myQueue(queueSize) + : myQueue{queueSize} { reset(); } diff --git a/src/common/HighScoresManager.cxx b/src/common/HighScoresManager.cxx index 59946b29b..4ddb06c79 100644 --- a/src/common/HighScoresManager.cxx +++ b/src/common/HighScoresManager.cxx @@ -60,7 +60,7 @@ using Common::Base; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - HighScoresManager::HighScoresManager(OSystem& osystem) - : myOSystem(osystem) + : myOSystem{osystem} { } diff --git a/src/common/JoyMap.hxx b/src/common/JoyMap.hxx index 9b77b09a1..d6fb76096 100644 --- a/src/common/JoyMap.hxx +++ b/src/common/JoyMap.hxx @@ -44,19 +44,19 @@ class JoyMap explicit JoyMapping(EventMode c_mode, int c_button, JoyAxis c_axis, JoyDir c_adir, int c_hat, JoyHatDir c_hdir) - : mode(c_mode), button(c_button), - axis(c_axis), adir(c_adir), - hat(c_hat), hdir(c_hdir) { } + : mode{c_mode}, button{c_button}, + axis{c_axis}, adir{c_adir}, + hat{c_hat}, hdir{c_hdir} { } explicit JoyMapping(EventMode c_mode, int c_button, JoyAxis c_axis, JoyDir c_adir) - : mode(c_mode), button(c_button), - axis(c_axis), adir(c_adir), - hat(JOY_CTRL_NONE), hdir(JoyHatDir::CENTER) { } + : mode{c_mode}, button{c_button}, + axis{c_axis}, adir{c_adir}, + hat{JOY_CTRL_NONE}, hdir{JoyHatDir::CENTER} { } explicit JoyMapping(EventMode c_mode, int c_button, int c_hat, JoyHatDir c_hdir) - : mode(c_mode), button(c_button), - axis(JoyAxis::NONE), adir(JoyDir::NONE), - hat(c_hat), hdir(c_hdir) { } + : mode{c_mode}, button{c_button}, + axis{JoyAxis::NONE}, adir{JoyDir::NONE}, + hat{c_hat}, hdir{c_hdir} { } JoyMapping(const JoyMapping&) = default; JoyMapping& operator=(const JoyMapping&) = default; diff --git a/src/common/KeyMap.hxx b/src/common/KeyMap.hxx index 0a067eead..6c9266c72 100644 --- a/src/common/KeyMap.hxx +++ b/src/common/KeyMap.hxx @@ -39,9 +39,9 @@ class KeyMap StellaMod mod{StellaMod(0)}; explicit Mapping(EventMode c_mode, StellaKey c_key, StellaMod c_mod) - : mode(c_mode), key(c_key), mod(c_mod) { } + : mode{c_mode}, key{c_key}, mod{c_mod} { } explicit Mapping(EventMode c_mode, int c_key, int c_mod) - : mode(c_mode), key(StellaKey(c_key)), mod(StellaMod(c_mod)) { } + : mode{c_mode}, key{StellaKey(c_key)}, mod{StellaMod(c_mod)} { } Mapping(const Mapping&) = default; Mapping& operator=(const Mapping&) = default; Mapping(Mapping&&) = default; diff --git a/src/common/MouseControl.cxx b/src/common/MouseControl.cxx index b91d72d1f..3e19fe8ee 100644 --- a/src/common/MouseControl.cxx +++ b/src/common/MouseControl.cxx @@ -24,9 +24,9 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MouseControl::MouseControl(Console& console, const string& mode) - : myProps(console.properties()), - myLeftController(console.leftController()), - myRightController(console.rightController()) + : myProps{console.properties()}, + myLeftController{console.leftController()}, + myRightController{console.rightController()} { istringstream m_axis(mode); string m_mode; diff --git a/src/common/PJoystickHandler.cxx b/src/common/PJoystickHandler.cxx index d93ae293c..174bb405f 100644 --- a/src/common/PJoystickHandler.cxx +++ b/src/common/PJoystickHandler.cxx @@ -36,8 +36,8 @@ using json = nlohmann::json; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PhysicalJoystickHandler::PhysicalJoystickHandler( OSystem& system, EventHandler& handler) - : myOSystem(system), - myHandler(handler) + : myOSystem{system}, + myHandler{handler} { if(myOSystem.settings().getInt("event_ver") != Event::VERSION) { Logger::info("event version mismatch; dropping previous joystick mappings"); diff --git a/src/common/PJoystickHandler.hxx b/src/common/PJoystickHandler.hxx index e02250da4..017479ceb 100644 --- a/src/common/PJoystickHandler.hxx +++ b/src/common/PJoystickHandler.hxx @@ -50,7 +50,7 @@ class PhysicalJoystickHandler struct StickInfo { StickInfo(const nlohmann::json& map = nullptr, PhysicalJoystickPtr stick = nullptr) - : mapping(map), joy(std::move(stick)) {} + : mapping{map}, joy{std::move(stick)} { } nlohmann::json mapping; PhysicalJoystickPtr joy; diff --git a/src/common/PKeyboardHandler.cxx b/src/common/PKeyboardHandler.cxx index 9e09755f1..5032afd66 100644 --- a/src/common/PKeyboardHandler.cxx +++ b/src/common/PKeyboardHandler.cxx @@ -1,5 +1,4 @@ //============================================================================ -//============================================================================ // // SSSS tt lll lll // SS SS tt ll ll @@ -41,8 +40,8 @@ static constexpr int MOD3 = KBDM_ALT; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PhysicalKeyboardHandler::PhysicalKeyboardHandler(OSystem& system, EventHandler& handler) - : myOSystem(system), - myHandler(handler) + : myOSystem{system}, + myHandler{handler} { Int32 version = myOSystem.settings().getInt("event_ver"); bool updateDefaults = false; diff --git a/src/common/PNGLibrary.cxx b/src/common/PNGLibrary.cxx index 2a6f84d6a..f8aff5220 100644 --- a/src/common/PNGLibrary.cxx +++ b/src/common/PNGLibrary.cxx @@ -33,7 +33,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PNGLibrary::PNGLibrary(OSystem& osystem) - : myOSystem(osystem) + : myOSystem{osystem} { } diff --git a/src/common/PaletteHandler.cxx b/src/common/PaletteHandler.cxx index 22740c1f6..ae7dfcba1 100644 --- a/src/common/PaletteHandler.cxx +++ b/src/common/PaletteHandler.cxx @@ -24,7 +24,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PaletteHandler::PaletteHandler(OSystem& system) - : myOSystem(system) + : myOSystem{system} { // Load user-defined palette for this ROM loadUserPalette(); diff --git a/src/common/PaletteHandler.hxx b/src/common/PaletteHandler.hxx index d5cda3a4b..82bfe70e8 100644 --- a/src/common/PaletteHandler.hxx +++ b/src/common/PaletteHandler.hxx @@ -139,7 +139,7 @@ class PaletteHandler float y{0.F}; explicit vector2d(float _x = 0.F, float _y = 0.F) - : x(_x), y(_y) { } + : x{_x}, y{_y} { } }; /** diff --git a/src/common/Rect.hxx b/src/common/Rect.hxx index 708de9d86..869cc5e75 100644 --- a/src/common/Rect.hxx +++ b/src/common/Rect.hxx @@ -32,6 +32,7 @@ namespace Common { */ struct Point { + // FIXME : make this uInt32 Int32 x{0}; //!< The horizontal part of the point Int32 y{0}; //!< The vertical part of the point diff --git a/src/common/RewindManager.cxx b/src/common/RewindManager.cxx index d6d277995..a170d418b 100644 --- a/src/common/RewindManager.cxx +++ b/src/common/RewindManager.cxx @@ -28,8 +28,8 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - RewindManager::RewindManager(OSystem& system, StateManager& statemgr) - : myOSystem(system), - myStateManager(statemgr) + : myOSystem{system}, + myStateManager{statemgr} { setup(); } diff --git a/src/common/SoundSDL2.cxx b/src/common/SoundSDL2.cxx index fb1fb6632..01f19fdc1 100644 --- a/src/common/SoundSDL2.cxx +++ b/src/common/SoundSDL2.cxx @@ -40,8 +40,8 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SoundSDL2::SoundSDL2(OSystem& osystem, AudioSettings& audioSettings) - : Sound(osystem), - myAudioSettings(audioSettings) + : Sound{osystem}, + myAudioSettings{audioSettings} { ASSERT_MAIN_THREAD; diff --git a/src/common/StaggeredLogger.cxx b/src/common/StaggeredLogger.cxx index 522d81c71..38d2c50fd 100644 --- a/src/common/StaggeredLogger.cxx +++ b/src/common/StaggeredLogger.cxx @@ -37,8 +37,8 @@ namespace { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - StaggeredLogger::StaggeredLogger(const string& message, Logger::Level level) - : myMessage(message), - myLevel(level) + : myMessage{message}, + myLevel{level} { } diff --git a/src/common/StateManager.cxx b/src/common/StateManager.cxx index 956f62409..690a00ad4 100644 --- a/src/common/StateManager.cxx +++ b/src/common/StateManager.cxx @@ -31,7 +31,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - StateManager::StateManager(OSystem& osystem) - : myOSystem(osystem) + : myOSystem{osystem} { myRewindManager = make_unique(myOSystem, *this); reset(); diff --git a/src/common/TimerManager.cxx b/src/common/TimerManager.cxx index 9b90dc3e1..24d31ceb9 100644 --- a/src/common/TimerManager.cxx +++ b/src/common/TimerManager.cxx @@ -20,7 +20,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TimerManager::TimerManager() - : nextId(no_timer + 1), + : nextId{no_timer + 1}, queue() { } diff --git a/src/common/Variant.hxx b/src/common/Variant.hxx index 6eaa44117..578eee7cb 100644 --- a/src/common/Variant.hxx +++ b/src/common/Variant.hxx @@ -44,8 +44,8 @@ class Variant public: Variant() { } // NOLINT - Variant(const string& s) : data(s) { } - Variant(const char* s) : data(s) { } + Variant(const string& s) : data{s} { } + Variant(const char* s) : data{s} { } Variant(Int32 i) { buf().str(""); buf() << i; data = buf().str(); } Variant(uInt32 i) { buf().str(""); buf() << i; data = buf().str(); } diff --git a/src/common/audio/ConvolutionBuffer.cxx b/src/common/audio/ConvolutionBuffer.cxx index 508e1886a..629b474da 100644 --- a/src/common/audio/ConvolutionBuffer.cxx +++ b/src/common/audio/ConvolutionBuffer.cxx @@ -19,9 +19,9 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ConvolutionBuffer::ConvolutionBuffer(uInt32 size) - : mySize(size) + : myData{make_unique(size)}, + mySize{size} { - myData = make_unique(mySize); std::fill_n(myData.get(), mySize, 0.F); } diff --git a/src/common/audio/HighPass.cxx b/src/common/audio/HighPass.cxx index 48a0107fe..f51c921ed 100644 --- a/src/common/audio/HighPass.cxx +++ b/src/common/audio/HighPass.cxx @@ -20,7 +20,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - HighPass::HighPass(float cutOffFrequency, float frequency) - : 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/audio/LanczosResampler.cxx b/src/common/audio/LanczosResampler.cxx index 27a115198..d14bac8e8 100644 --- a/src/common/audio/LanczosResampler.cxx +++ b/src/common/audio/LanczosResampler.cxx @@ -69,12 +69,12 @@ LanczosResampler::LanczosResampler( // formatFrom.sampleRate / formatTo.sampleRate = M / N // // -> we find N from fully reducing the fraction. - myPrecomputedKernelCount(reducedDenominator(formatFrom.sampleRate, formatTo.sampleRate)), - myKernelSize(2 * kernelParameter), - myKernelParameter(kernelParameter), - myHighPassL(HIGH_PASS_CUT_OFF, float(formatFrom.sampleRate)), - myHighPassR(HIGH_PASS_CUT_OFF, float(formatFrom.sampleRate)), - myHighPass(HIGH_PASS_CUT_OFF, float(formatFrom.sampleRate)) + myPrecomputedKernelCount{reducedDenominator(formatFrom.sampleRate, formatTo.sampleRate)}, + myKernelSize{2 * kernelParameter}, + myKernelParameter{kernelParameter}, + myHighPassL{HIGH_PASS_CUT_OFF, float(formatFrom.sampleRate)}, + myHighPassR{HIGH_PASS_CUT_OFF, float(formatFrom.sampleRate)}, + myHighPass{HIGH_PASS_CUT_OFF, float(formatFrom.sampleRate)} { myPrecomputedKernels = make_unique(myPrecomputedKernelCount * myKernelSize); diff --git a/src/common/audio/Resampler.hxx b/src/common/audio/Resampler.hxx index 1fda17aa6..aa6de4ba0 100644 --- a/src/common/audio/Resampler.hxx +++ b/src/common/audio/Resampler.hxx @@ -51,12 +51,11 @@ class Resampler { public: Resampler(Format formatFrom, Format formatTo, - const NextFragmentCallback& nextFragmentCallback) : - myFormatFrom(formatFrom), - myFormatTo(formatTo), - myNextFragmentCallback(nextFragmentCallback), - myUnderrunLogger("audio buffer underrun", Logger::Level::INFO) - {} + const NextFragmentCallback& nextFragmentCallback) + : myFormatFrom{formatFrom}, + myFormatTo{formatTo}, + myNextFragmentCallback{nextFragmentCallback}, + myUnderrunLogger{"audio buffer underrun", Logger::Level::INFO} { } virtual void fillFragment(float* fragment, uInt32 length) = 0; diff --git a/src/common/audio/SimpleResampler.hxx b/src/common/audio/SimpleResampler.hxx index 7098b8260..6dfdcc1b3 100644 --- a/src/common/audio/SimpleResampler.hxx +++ b/src/common/audio/SimpleResampler.hxx @@ -39,13 +39,11 @@ class SimpleResampler : public Resampler bool myIsUnderrun{true}; private: - SimpleResampler() = delete; SimpleResampler(const SimpleResampler&) = delete; SimpleResampler(SimpleResampler&&) = delete; SimpleResampler& operator=(const SimpleResampler&) = delete; SimpleResampler& operator=(const SimpleResampler&&) = delete; - }; #endif // SIMPLE_RESAMPLER_HXX diff --git a/src/common/jsonDefinitions.hxx b/src/common/jsonDefinitions.hxx index e5728cf21..5d8d53c7d 100644 --- a/src/common/jsonDefinitions.hxx +++ b/src/common/jsonDefinitions.hxx @@ -1,3 +1,20 @@ +//============================================================================ +// +// SSSS tt lll lll +// SS SS tt ll ll +// SS tttttt eeee ll ll aaaa +// SSSS tt ee ee ll ll aa +// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator" +// SS SS tt ee ll ll aa aa +// SSSS ttt eeeee llll llll aaaaa +// +// Copyright (c) 1995-2020 by Bradford W. Mott, Stephen Anthony +// and the Stella Team +// +// See the file "License.txt" for information on usage and redistribution of +// this file, and for a DISCLAIMER OF ALL WARRANTIES. +//============================================================================ + #ifndef JSON_DEFINITIONS_HXX #define JSON_DEFINITIONS_HXX diff --git a/src/common/repository/KeyValueRepositoryConfigfile.cxx b/src/common/repository/KeyValueRepositoryConfigfile.cxx index ca9f6b3a4..b0e6ae725 100644 --- a/src/common/repository/KeyValueRepositoryConfigfile.cxx +++ b/src/common/repository/KeyValueRepositoryConfigfile.cxx @@ -29,7 +29,7 @@ namespace { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - KeyValueRepositoryConfigfile::KeyValueRepositoryConfigfile(const FilesystemNode& file) - : myFile(file) + : myFile{file} { } diff --git a/src/common/repository/sqlite/KeyValueRepositorySqlite.cxx b/src/common/repository/sqlite/KeyValueRepositorySqlite.cxx index d27dd34b0..e8480ebfb 100644 --- a/src/common/repository/sqlite/KeyValueRepositorySqlite.cxx +++ b/src/common/repository/sqlite/KeyValueRepositorySqlite.cxx @@ -22,10 +22,9 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - KeyValueRepositorySqlite::KeyValueRepositorySqlite( - SqliteDatabase& db, - const string& tableName -) : myTableName(tableName), - myDb(db) + SqliteDatabase& db, const string& tableName) + : myTableName{tableName}, + myDb{db} { } diff --git a/src/common/repository/sqlite/SettingsDb.cxx b/src/common/repository/sqlite/SettingsDb.cxx index d69b6041e..b45b908bc 100644 --- a/src/common/repository/sqlite/SettingsDb.cxx +++ b/src/common/repository/sqlite/SettingsDb.cxx @@ -20,12 +20,11 @@ #include "SqliteError.hxx" // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -SettingsDb::SettingsDb( - const string& databaseDirectory, - const string& databaseName -) : myDatabaseDirectory(databaseDirectory), - myDatabaseName(databaseName) -{} +SettingsDb::SettingsDb(const string& databaseDirectory, const string& databaseName) + : myDatabaseDirectory{databaseDirectory}, + myDatabaseName{databaseName} +{ +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool SettingsDb::initialize() diff --git a/src/common/repository/sqlite/SqliteDatabase.cxx b/src/common/repository/sqlite/SqliteDatabase.cxx index 2c10b01bb..ba00c97a7 100644 --- a/src/common/repository/sqlite/SqliteDatabase.cxx +++ b/src/common/repository/sqlite/SqliteDatabase.cxx @@ -30,7 +30,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SqliteDatabase::SqliteDatabase(const string& databaseDirectory, const string& databaseName) - : myDatabaseFile(databaseDirectory + SEPARATOR + databaseName + ".sqlite3") + : myDatabaseFile{databaseDirectory + SEPARATOR + databaseName + ".sqlite3"} { } diff --git a/src/common/repository/sqlite/SqliteStatement.cxx b/src/common/repository/sqlite/SqliteStatement.cxx index 516499fae..34348637c 100644 --- a/src/common/repository/sqlite/SqliteStatement.cxx +++ b/src/common/repository/sqlite/SqliteStatement.cxx @@ -19,7 +19,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SqliteStatement::SqliteStatement(sqlite3* handle, string sql) - : myHandle(handle) + : myHandle{handle} { if (sqlite3_prepare_v2(handle, sql.c_str(), -1, &myStmt, nullptr) != SQLITE_OK) throw SqliteError(handle); diff --git a/src/common/repository/sqlite/SqliteTransaction.cxx b/src/common/repository/sqlite/SqliteTransaction.cxx index 45c022d5c..2bda587a0 100644 --- a/src/common/repository/sqlite/SqliteTransaction.cxx +++ b/src/common/repository/sqlite/SqliteTransaction.cxx @@ -20,7 +20,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SqliteTransaction::SqliteTransaction(SqliteDatabase& db) - : myDb(db) + : myDb{db} { myDb.exec("BEGIN TRANSACTION"); } diff --git a/src/common/sdl_blitter/BilinearBlitter.cxx b/src/common/sdl_blitter/BilinearBlitter.cxx index d8f25d133..ff792eb57 100644 --- a/src/common/sdl_blitter/BilinearBlitter.cxx +++ b/src/common/sdl_blitter/BilinearBlitter.cxx @@ -21,8 +21,8 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BilinearBlitter::BilinearBlitter(FBBackendSDL2& fb, bool interpolate) - : myFB(fb), - myInterpolate(interpolate) + : myFB{fb}, + myInterpolate{interpolate} { } diff --git a/src/common/sdl_blitter/BlitterFactory.cxx b/src/common/sdl_blitter/BlitterFactory.cxx index 3c969b71b..018f10400 100644 --- a/src/common/sdl_blitter/BlitterFactory.cxx +++ b/src/common/sdl_blitter/BlitterFactory.cxx @@ -21,7 +21,8 @@ #include "BilinearBlitter.hxx" #include "QisBlitter.hxx" -unique_ptr BlitterFactory::createBlitter(FBBackendSDL2& fb, ScalingAlgorithm scaling) +unique_ptr +BlitterFactory::createBlitter(FBBackendSDL2& fb, ScalingAlgorithm scaling) { if (!fb.isInitialized()) { throw runtime_error("BlitterFactory requires an initialized framebuffer!"); diff --git a/src/common/sdl_blitter/QisBlitter.cxx b/src/common/sdl_blitter/QisBlitter.cxx index c0b7f7dbd..cafc4040a 100644 --- a/src/common/sdl_blitter/QisBlitter.cxx +++ b/src/common/sdl_blitter/QisBlitter.cxx @@ -21,7 +21,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - QisBlitter::QisBlitter(FBBackendSDL2& fb) - : myFB(fb) + : myFB{fb} { } diff --git a/src/debugger/CartDebug.cxx b/src/debugger/CartDebug.cxx index ad2e623d7..2eeb749d0 100644 --- a/src/debugger/CartDebug.cxx +++ b/src/debugger/CartDebug.cxx @@ -48,7 +48,7 @@ using std::right; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CartDebug::CartDebug(Debugger& dbg, Console& console, const OSystem& osystem) : DebuggerSystem(dbg, console), - myOSystem(osystem) + myOSystem{osystem} { // Add case sensitive compare for user labels // TODO - should user labels be case insensitive too? diff --git a/src/debugger/CpuDebug.cxx b/src/debugger/CpuDebug.cxx index f0bf9be12..e564a1fa2 100644 --- a/src/debugger/CpuDebug.cxx +++ b/src/debugger/CpuDebug.cxx @@ -27,7 +27,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CpuDebug::CpuDebug(Debugger& dbg, Console& console) : DebuggerSystem(dbg, console), - my6502(mySystem.m6502()) + my6502{mySystem.m6502()} { } diff --git a/src/debugger/Debugger.cxx b/src/debugger/Debugger.cxx index c7c65f2ec..fc128bbf5 100644 --- a/src/debugger/Debugger.cxx +++ b/src/debugger/Debugger.cxx @@ -62,8 +62,8 @@ Debugger* Debugger::myStaticDebugger = nullptr; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Debugger::Debugger(OSystem& osystem, Console& console) : DialogContainer(osystem), - myConsole(console), - mySystem(console.system()) + myConsole{console}, + mySystem{console.system()} { // Init parser myParser = make_unique(*this, osystem.settings()); diff --git a/src/debugger/DebuggerExpressions.hxx b/src/debugger/DebuggerExpressions.hxx index 060411c09..616bb2d43 100644 --- a/src/debugger/DebuggerExpressions.hxx +++ b/src/debugger/DebuggerExpressions.hxx @@ -91,7 +91,7 @@ class ByteDerefOffsetExpression : public Expression class ConstExpression : public Expression { public: - ConstExpression(const int value) : Expression(), myValue(value) { } + ConstExpression(const int value) : Expression(), myValue{value} { } Int32 evaluate() const override { return myValue; } @@ -103,7 +103,7 @@ class ConstExpression : public Expression class CpuMethodExpression : public Expression { public: - CpuMethodExpression(CpuMethod method) : Expression(), myMethod(std::mem_fn(method)) { } + CpuMethodExpression(CpuMethod method) : Expression(), myMethod{std::mem_fn(method)} { } Int32 evaluate() const override { return myMethod(Debugger::debugger().cpuDebug()); } @@ -134,7 +134,7 @@ class EqualsExpression : public Expression class EquateExpression : public Expression { public: - EquateExpression(const string& label) : Expression(), myLabel(label) { } + EquateExpression(const string& label) : Expression(), myLabel{label} { } Int32 evaluate() const override { return Debugger::debugger().cartDebug().getAddress(myLabel); } @@ -146,7 +146,7 @@ class EquateExpression : public Expression class FunctionExpression : public Expression { public: - FunctionExpression(const string& label) : Expression(), myLabel(label) { } + FunctionExpression(const string& label) : Expression(), myLabel{label} { } Int32 evaluate() const override { return Debugger::debugger().getFunction(myLabel).evaluate(); } @@ -285,7 +285,7 @@ class PlusExpression : public Expression class CartMethodExpression : public Expression { public: - CartMethodExpression(CartMethod method) : Expression(), myMethod(std::mem_fn(method)) { } + CartMethodExpression(CartMethod method) : Expression(), myMethod{std::mem_fn(method)} { } Int32 evaluate() const override { return myMethod(Debugger::debugger().cartDebug()); } @@ -315,7 +315,7 @@ class ShiftRightExpression : public Expression class RiotMethodExpression : public Expression { public: - RiotMethodExpression(RiotMethod method) : Expression(), myMethod(std::mem_fn(method)) { } + RiotMethodExpression(RiotMethod method) : Expression(), myMethod{std::mem_fn(method)} { } Int32 evaluate() const override { return myMethod(Debugger::debugger().riotDebug()); } @@ -327,7 +327,7 @@ class RiotMethodExpression : public Expression class TiaMethodExpression : public Expression { public: - TiaMethodExpression(TiaMethod method) : Expression(), myMethod(std::mem_fn(method)) { } + TiaMethodExpression(TiaMethod method) : Expression(), myMethod{std::mem_fn(method)} { } Int32 evaluate() const override { return myMethod(Debugger::debugger().tiaDebug()); } diff --git a/src/debugger/DebuggerParser.cxx b/src/debugger/DebuggerParser.cxx index d6f87b15d..599c6eb31 100644 --- a/src/debugger/DebuggerParser.cxx +++ b/src/debugger/DebuggerParser.cxx @@ -57,8 +57,8 @@ using std::right; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - DebuggerParser::DebuggerParser(Debugger& d, Settings& s) - : debugger(d), - settings(s) + : debugger{d}, + settings{s} { } diff --git a/src/debugger/DiStella.cxx b/src/debugger/DiStella.cxx index c77d1eabf..10c277c8f 100644 --- a/src/debugger/DiStella.cxx +++ b/src/debugger/DiStella.cxx @@ -27,12 +27,12 @@ DiStella::DiStella(const CartDebug& dbg, CartDebug::DisassemblyList& list, CartDebug::AddrTypeArray& labels, CartDebug::AddrTypeArray& directives, CartDebug::ReservedEquates& reserved) - : myDbg(dbg), - myList(list), - mySettings(s), - myReserved(reserved), - myLabels(labels), - myDirectives(directives) + : myDbg{dbg}, + myList{list}, + mySettings{s}, + myReserved{reserved}, + myLabels{labels}, + myDirectives{directives} { bool resolve_code = mySettings.resolveCode; CartDebug::AddressList& debuggerAddresses = info.addressList; diff --git a/src/debugger/Expression.hxx b/src/debugger/Expression.hxx index 04eddec49..3865181ce 100644 --- a/src/debugger/Expression.hxx +++ b/src/debugger/Expression.hxx @@ -32,7 +32,7 @@ class Expression { public: Expression(Expression* lhs = nullptr, Expression* rhs = nullptr) - : myLHS(lhs), myRHS(rhs) { } + : myLHS{lhs}, myRHS{rhs} { } virtual ~Expression() = default; virtual Int32 evaluate() const { return 0; } diff --git a/src/debugger/TIADebug.cxx b/src/debugger/TIADebug.cxx index 01b870d68..87e91fcfb 100644 --- a/src/debugger/TIADebug.cxx +++ b/src/debugger/TIADebug.cxx @@ -26,7 +26,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TIADebug::TIADebug(Debugger& dbg, Console& console) : DebuggerSystem(dbg, console), - myTIA(console.tia()) + myTIA{console.tia()} { } diff --git a/src/debugger/gui/Cart3EPlusWidget.cxx b/src/debugger/gui/Cart3EPlusWidget.cxx index cd0fda251..bf62f3384 100644 --- a/src/debugger/gui/Cart3EPlusWidget.cxx +++ b/src/debugger/gui/Cart3EPlusWidget.cxx @@ -25,7 +25,7 @@ Cartridge3EPlusWidget::Cartridge3EPlusWidget( GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, int x, int y, int w, int h, Cartridge3EPlus& cart) : CartridgeEnhancedWidget(boss, lfont, nfont, x, y, w, h, cart), - myCart3EP(cart) + myCart3EP{cart} { initialize(); } diff --git a/src/debugger/gui/Cart4A50Widget.cxx b/src/debugger/gui/Cart4A50Widget.cxx index 1fed0eecb..c4801f5cf 100644 --- a/src/debugger/gui/Cart4A50Widget.cxx +++ b/src/debugger/gui/Cart4A50Widget.cxx @@ -24,7 +24,7 @@ Cartridge4A50Widget::Cartridge4A50Widget( GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, int x, int y, int w, int h, Cartridge4A50& cart) : CartDebugWidget(boss, lfont, nfont, x, y, w, h), - myCart(cart) + myCart{cart} { string info = "4A50 cartridge - 128K ROM and 32K RAM, split in various bank configurations\n" diff --git a/src/debugger/gui/CartARWidget.cxx b/src/debugger/gui/CartARWidget.cxx index ec4c4037a..6d9af58c7 100644 --- a/src/debugger/gui/CartARWidget.cxx +++ b/src/debugger/gui/CartARWidget.cxx @@ -27,7 +27,7 @@ CartridgeARWidget::CartridgeARWidget( GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, int x, int y, int w, int h, CartridgeAR& cart) : CartDebugWidget(boss, lfont, nfont, x, y, w, h), - myCart(cart) + myCart{cart} { size_t size = myCart.mySize; diff --git a/src/debugger/gui/CartBUSWidget.cxx b/src/debugger/gui/CartBUSWidget.cxx index dbfe8c172..6699143ec 100644 --- a/src/debugger/gui/CartBUSWidget.cxx +++ b/src/debugger/gui/CartBUSWidget.cxx @@ -25,7 +25,7 @@ CartridgeBUSWidget::CartridgeBUSWidget( GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, int x, int y, int w, int h, CartridgeBUS& cart) : CartDebugWidget(boss, lfont, nfont, x, y, w, h), - myCart(cart) + myCart{cart} { uInt16 size = 8 * 4096; diff --git a/src/debugger/gui/CartCDFWidget.cxx b/src/debugger/gui/CartCDFWidget.cxx index 8b43d0fc8..f6541cc93 100644 --- a/src/debugger/gui/CartCDFWidget.cxx +++ b/src/debugger/gui/CartCDFWidget.cxx @@ -24,7 +24,7 @@ CartridgeCDFWidget::CartridgeCDFWidget( GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, int x, int y, int w, int h, CartridgeCDF& cart) : CartDebugWidget(boss, lfont, nfont, x, y, w, h), - myCart(cart) + myCart{cart} { const int VBORDER = 8; const int HBORDER = 2; diff --git a/src/debugger/gui/CartCMWidget.cxx b/src/debugger/gui/CartCMWidget.cxx index e4d11ba55..7616ea61b 100644 --- a/src/debugger/gui/CartCMWidget.cxx +++ b/src/debugger/gui/CartCMWidget.cxx @@ -31,7 +31,7 @@ CartridgeCMWidget::CartridgeCMWidget( GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, int x, int y, int w, int h, CartridgeCM& cart) : CartDebugWidget(boss, lfont, nfont, x, y, w, h), - myCart(cart) + myCart{cart} { uInt16 size = 4 * 4096; diff --git a/src/debugger/gui/CartCTYWidget.cxx b/src/debugger/gui/CartCTYWidget.cxx index 659fb9bea..8c15b1e9f 100644 --- a/src/debugger/gui/CartCTYWidget.cxx +++ b/src/debugger/gui/CartCTYWidget.cxx @@ -27,7 +27,7 @@ CartridgeCTYWidget::CartridgeCTYWidget( GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, int x, int y, int w, int h, CartridgeCTY& cart) : CartDebugWidget(boss, lfont, nfont, x, y, w, h), - myCart(cart) + myCart{cart} { uInt16 size = 8 * 4096; diff --git a/src/debugger/gui/CartDPCPlusWidget.cxx b/src/debugger/gui/CartDPCPlusWidget.cxx index 18166c6af..1bdfef379 100644 --- a/src/debugger/gui/CartDPCPlusWidget.cxx +++ b/src/debugger/gui/CartDPCPlusWidget.cxx @@ -25,7 +25,7 @@ CartridgeDPCPlusWidget::CartridgeDPCPlusWidget( GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, int x, int y, int w, int h, CartridgeDPCPlus& cart) : CartDebugWidget(boss, lfont, nfont, x, y, w, h), - myCart(cart) + myCart{cart} { size_t size = cart.mySize; diff --git a/src/debugger/gui/CartDPCWidget.cxx b/src/debugger/gui/CartDPCWidget.cxx index c626b52fa..c6fb55d49 100644 --- a/src/debugger/gui/CartDPCWidget.cxx +++ b/src/debugger/gui/CartDPCWidget.cxx @@ -25,7 +25,7 @@ CartridgeDPCWidget::CartridgeDPCWidget( GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, int x, int y, int w, int h, CartridgeDPC& cart) : CartDebugWidget(boss, lfont, nfont, x, y, w, h), - myCart(cart) + myCart{cart} { const int V_GAP = 4; size_t size = cart.mySize; diff --git a/src/debugger/gui/CartDebugWidget.cxx b/src/debugger/gui/CartDebugWidget.cxx index 778a70c50..0fa29bb96 100644 --- a/src/debugger/gui/CartDebugWidget.cxx +++ b/src/debugger/gui/CartDebugWidget.cxx @@ -29,11 +29,11 @@ CartDebugWidget::CartDebugWidget(GuiObject* boss, const GUI::Font& lfont, int x, int y, int w, int h) : Widget(boss, lfont, x, y, w, h), CommandSender(boss), - _nfont(nfont), - myFontWidth(lfont.getMaxCharWidth()), - myFontHeight(lfont.getFontHeight()), - myLineHeight(lfont.getLineHeight()), - myButtonHeight(myLineHeight + 4) + _nfont{nfont}, + myFontWidth{lfont.getMaxCharWidth()}, + myFontHeight{lfont.getFontHeight()}, + myLineHeight{lfont.getLineHeight()}, + myButtonHeight{myLineHeight + 4} { } diff --git a/src/debugger/gui/CartE78KWidget.cxx b/src/debugger/gui/CartE78KWidget.cxx index 2ad1c012e..24c39e8f1 100644 --- a/src/debugger/gui/CartE78KWidget.cxx +++ b/src/debugger/gui/CartE78KWidget.cxx @@ -21,9 +21,9 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CartridgeE78KWidget::CartridgeE78KWidget( - GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, - int x, int y, int w, int h, - CartridgeMNetwork& cart) + GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, + int x, int y, int w, int h, + CartridgeMNetwork& cart) : CartridgeMNetworkWidget(boss, lfont, nfont, x, y, w, h, cart) { ostringstream info; diff --git a/src/debugger/gui/CartEnhancedWidget.cxx b/src/debugger/gui/CartEnhancedWidget.cxx index 80da02ffd..486dddaca 100644 --- a/src/debugger/gui/CartEnhancedWidget.cxx +++ b/src/debugger/gui/CartEnhancedWidget.cxx @@ -28,7 +28,7 @@ CartridgeEnhancedWidget::CartridgeEnhancedWidget(GuiObject* boss, const GUI::Fon int x, int y, int w, int h, CartridgeEnhanced& cart) : CartDebugWidget(boss, lfont, nfont, x, y, w, h), - myCart(cart) + myCart{cart} { } diff --git a/src/debugger/gui/CartFA2Widget.cxx b/src/debugger/gui/CartFA2Widget.cxx index e7dcba933..22020ad69 100644 --- a/src/debugger/gui/CartFA2Widget.cxx +++ b/src/debugger/gui/CartFA2Widget.cxx @@ -23,7 +23,7 @@ CartridgeFA2Widget::CartridgeFA2Widget( GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, int x, int y, int w, int h, CartridgeFA2& cart) : CartridgeEnhancedWidget(boss, lfont, nfont, x, y, w, h, cart), - myCartFA2(cart) + myCartFA2{cart} { int xpos = 2, ypos = initialize(); diff --git a/src/debugger/gui/CartFCWidget.cxx b/src/debugger/gui/CartFCWidget.cxx index d206ec694..2d7d29efe 100644 --- a/src/debugger/gui/CartFCWidget.cxx +++ b/src/debugger/gui/CartFCWidget.cxx @@ -20,8 +20,8 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CartridgeFCWidget::CartridgeFCWidget( - GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, - int x, int y, int w, int h, CartridgeFC& cart) + GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, + int x, int y, int w, int h, CartridgeFC& cart) : CartridgeEnhancedWidget(boss, lfont, nfont, x, y, w, h, cart) { initialize(); diff --git a/src/debugger/gui/CartMDMWidget.cxx b/src/debugger/gui/CartMDMWidget.cxx index 3b1084aee..7e476734c 100644 --- a/src/debugger/gui/CartMDMWidget.cxx +++ b/src/debugger/gui/CartMDMWidget.cxx @@ -24,7 +24,7 @@ CartridgeMDMWidget::CartridgeMDMWidget( GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, int x, int y, int w, int h, CartridgeMDM& cart) : CartridgeEnhancedWidget(boss, lfont, nfont, x, y, w, h, cart), - myCartMDM(cart) + myCartMDM{cart} { initialize(); } diff --git a/src/debugger/gui/CartMNetworkWidget.cxx b/src/debugger/gui/CartMNetworkWidget.cxx index e56a1ecb7..b251faebf 100644 --- a/src/debugger/gui/CartMNetworkWidget.cxx +++ b/src/debugger/gui/CartMNetworkWidget.cxx @@ -26,7 +26,7 @@ CartridgeMNetworkWidget::CartridgeMNetworkWidget( int x, int y, int w, int h, CartridgeMNetwork& cart) : CartDebugWidget(boss, lfont, nfont, x, y, w, h), - myCart(cart) + myCart{cart} { } diff --git a/src/debugger/gui/CartRamWidget.cxx b/src/debugger/gui/CartRamWidget.cxx index 0ab421df3..5cdb5e261 100644 --- a/src/debugger/gui/CartRamWidget.cxx +++ b/src/debugger/gui/CartRamWidget.cxx @@ -33,11 +33,11 @@ CartRamWidget::CartRamWidget( int x, int y, int w, int h, CartDebugWidget& cartDebug) : Widget(boss, lfont, x, y, w, h), CommandSender(boss), - _nfont(nfont), - myFontWidth(lfont.getMaxCharWidth()), - myFontHeight(lfont.getFontHeight()), - myLineHeight(lfont.getLineHeight()), - myButtonHeight(myLineHeight + 4) + _nfont{nfont}, + myFontWidth{lfont.getMaxCharWidth()}, + myFontHeight{lfont.getFontHeight()}, + myLineHeight{lfont.getLineHeight()}, + myButtonHeight{myLineHeight + 4} { int lwidth = lfont.getStringWidth("Description "), fwidth = w - lwidth - 20; diff --git a/src/debugger/gui/CartTVBoyWidget.cxx b/src/debugger/gui/CartTVBoyWidget.cxx index 891a39b38..306cc1f75 100644 --- a/src/debugger/gui/CartTVBoyWidget.cxx +++ b/src/debugger/gui/CartTVBoyWidget.cxx @@ -24,7 +24,7 @@ CartridgeTVBoyWidget::CartridgeTVBoyWidget( GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, int x, int y, int w, int h, CartridgeTVBoy& cart) : CartridgeEnhancedWidget(boss, lfont, nfont, x, y, w, h, cart), - myCartTVBoy(cart) + myCartTVBoy{cart} { initialize(); } diff --git a/src/debugger/gui/CartUAWidget.cxx b/src/debugger/gui/CartUAWidget.cxx index 02728b52d..5b65db7fc 100644 --- a/src/debugger/gui/CartUAWidget.cxx +++ b/src/debugger/gui/CartUAWidget.cxx @@ -23,7 +23,7 @@ CartridgeUAWidget::CartridgeUAWidget( GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, int x, int y, int w, int h, CartridgeUA& cart, bool swapHotspots) : CartridgeEnhancedWidget(boss, lfont, nfont, x, y, w, h, cart), - mySwappedHotspots(swapHotspots) + mySwappedHotspots{swapHotspots} { myHotspotDelta = 0x20; initialize(); diff --git a/src/debugger/gui/CartWDWidget.cxx b/src/debugger/gui/CartWDWidget.cxx index 268e81bf1..6d2219e25 100644 --- a/src/debugger/gui/CartWDWidget.cxx +++ b/src/debugger/gui/CartWDWidget.cxx @@ -23,7 +23,7 @@ CartridgeWDWidget::CartridgeWDWidget( GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, int x, int y, int w, int h, CartridgeWD& cart) : CartridgeEnhancedWidget(boss, lfont, nfont, x, y, w, h, cart), - myCartWD(cart) + myCartWD{cart} { initialize(); } diff --git a/src/debugger/gui/DataGridRamWidget.cxx b/src/debugger/gui/DataGridRamWidget.cxx index 7445f1d90..33584180a 100644 --- a/src/debugger/gui/DataGridRamWidget.cxx +++ b/src/debugger/gui/DataGridRamWidget.cxx @@ -27,7 +27,7 @@ DataGridRamWidget::DataGridRamWidget(GuiObject* boss, const RamWidget& ram, bool useScrollbar) : DataGridWidget(boss, font, x, y, cols, rows, colchars, bits, base, useScrollbar), - _ram(ram) + _ram{ram} { } diff --git a/src/debugger/gui/DataGridWidget.cxx b/src/debugger/gui/DataGridWidget.cxx index 2e7214379..dfa514826 100644 --- a/src/debugger/gui/DataGridWidget.cxx +++ b/src/debugger/gui/DataGridWidget.cxx @@ -38,12 +38,12 @@ DataGridWidget::DataGridWidget(GuiObject* boss, const GUI::Font& font, : EditableWidget(boss, font, x, y, cols*(colchars * font.getMaxCharWidth() + 8) + 1, font.getLineHeight()*rows + 1), - _rows(rows), - _cols(cols), - _rowHeight(font.getLineHeight()), - _colWidth(colchars * font.getMaxCharWidth() + 8), - _bits(bits), - _base(base) + _rows{rows}, + _cols{cols}, + _rowHeight{font.getLineHeight()}, + _colWidth{colchars * font.getMaxCharWidth() + 8}, + _bits{bits}, + _base{base} { _flags = Widget::FLAG_ENABLED | Widget::FLAG_RETAIN_FOCUS | Widget::FLAG_WANTS_RAWDATA; _editMode = false; diff --git a/src/debugger/gui/PromptWidget.cxx b/src/debugger/gui/PromptWidget.cxx index 116080bf7..1ed5b2350 100644 --- a/src/debugger/gui/PromptWidget.cxx +++ b/src/debugger/gui/PromptWidget.cxx @@ -41,12 +41,12 @@ PromptWidget::PromptWidget(GuiObject* boss, const GUI::Font& font, int x, int y, int w, int h) : Widget(boss, font, x, y, w - ScrollBarWidget::scrollBarWidth(font), h), CommandSender(boss), - _historySize(0), - _historyIndex(0), - _historyLine(0), - _makeDirty(false), - _firstTime(true), - _exitedEarly(false) + _historySize{0}, + _historyIndex{0}, + _historyLine{0}, + _makeDirty{false}, + _firstTime{true}, + _exitedEarly{false} { _flags = Widget::FLAG_ENABLED | Widget::FLAG_CLEARBG | Widget::FLAG_RETAIN_FOCUS | Widget::FLAG_WANTS_TAB | Widget::FLAG_WANTS_RAWDATA; diff --git a/src/debugger/gui/RamWidget.cxx b/src/debugger/gui/RamWidget.cxx index 4e097d9be..468784081 100644 --- a/src/debugger/gui/RamWidget.cxx +++ b/src/debugger/gui/RamWidget.cxx @@ -33,14 +33,14 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n uInt32 ramsize, uInt32 numrows, uInt32 pagesize) : Widget(boss, lfont, x, y, w, h), CommandSender(boss), - _nfont(nfont), - myFontWidth(lfont.getMaxCharWidth()), - myFontHeight(lfont.getFontHeight()), - myLineHeight(lfont.getLineHeight()), - myButtonHeight(myLineHeight * 1.25), - myRamSize(ramsize), - myNumRows(numrows), - myPageSize(pagesize) + _nfont{nfont}, + myFontWidth{lfont.getMaxCharWidth()}, + myFontHeight{lfont.getFontHeight()}, + myLineHeight{lfont.getLineHeight()}, + myButtonHeight{static_cast(myLineHeight * 1.25)}, + myRamSize{ramsize}, + myNumRows{numrows}, + myPageSize{pagesize} { const int bwidth = lfont.getStringWidth("Compare " + ELLIPSIS), bheight = myLineHeight + 2; diff --git a/src/debugger/gui/RiotRamWidget.cxx b/src/debugger/gui/RiotRamWidget.cxx index 5f3d5c0ab..501ccadce 100644 --- a/src/debugger/gui/RiotRamWidget.cxx +++ b/src/debugger/gui/RiotRamWidget.cxx @@ -25,7 +25,7 @@ RiotRamWidget::RiotRamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, int x, int y, int w) : RamWidget(boss, lfont, nfont, x, y, w, 0, 128, 8, 128), - myDbg(instance().debugger().cartDebug()) + myDbg{instance().debugger().cartDebug()} { } diff --git a/src/debugger/gui/ToggleBitWidget.cxx b/src/debugger/gui/ToggleBitWidget.cxx index 629e58c57..2a285563a 100644 --- a/src/debugger/gui/ToggleBitWidget.cxx +++ b/src/debugger/gui/ToggleBitWidget.cxx @@ -28,7 +28,7 @@ ToggleBitWidget::ToggleBitWidget(GuiObject* boss, const GUI::Font& font, int x, int y, int cols, int rows, int colchars, const StringList& labels) : ToggleWidget(boss, font, x, y, cols, rows), - _labelList(labels) + _labelList{labels} { _rowHeight = font.getLineHeight(); _colWidth = colchars * font.getMaxCharWidth() + 8; diff --git a/src/debugger/gui/ToggleWidget.cxx b/src/debugger/gui/ToggleWidget.cxx index adb33e118..bebee597d 100644 --- a/src/debugger/gui/ToggleWidget.cxx +++ b/src/debugger/gui/ToggleWidget.cxx @@ -28,9 +28,9 @@ ToggleWidget::ToggleWidget(GuiObject* boss, const GUI::Font& font, int x, int y, int cols, int rows, int shiftBits) : Widget(boss, font, x, y, 16, 16), CommandSender(boss), - _rows(rows), - _cols(cols), - _shiftBits(shiftBits) + _rows{rows}, + _cols{cols}, + _shiftBits{shiftBits} { _flags = Widget::FLAG_ENABLED | Widget::FLAG_CLEARBG | Widget::FLAG_RETAIN_FOCUS | Widget::FLAG_WANTS_RAWDATA;