Make variables initialized in c'tor initialization list use brace-syntax.

- This is on the advice of one of the static analyzers we use.
 - More classes have to be converted; this is only the first pass.
This commit is contained in:
Stephen Anthony 2020-12-20 12:06:10 -03:30
parent 1ae5a73afe
commit b36729a825
79 changed files with 183 additions and 170 deletions

View File

@ -28,7 +28,7 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CheatManager::CheatManager(OSystem& osystem) CheatManager::CheatManager(OSystem& osystem)
: myOSystem(osystem) : myOSystem{osystem}
{ {
} }

View File

@ -23,9 +23,9 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CheetahCheat::CheetahCheat(OSystem& os, const string& name, const string& code) CheetahCheat::CheetahCheat(OSystem& os, const string& name, const string& code)
: Cheat(os, name, code), : Cheat(os, name, code),
address(0xf000 + unhex(code.substr(0, 3))), address{uInt16(0xf000 + unhex(code.substr(0, 3)))},
value(uInt8(unhex(code.substr(3, 2)))), value{uInt8(unhex(code.substr(3, 2)))},
count(uInt8(unhex(code.substr(5, 1)) + 1)) count{uInt8(unhex(code.substr(5, 1)) + 1)}
{ {
// Back up original data; we need this if the cheat is ever disabled // Back up original data; we need this if the cheat is ever disabled
for(int i = 0; i < count; ++i) for(int i = 0; i < count; ++i)

View File

@ -25,8 +25,8 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
RamCheat::RamCheat(OSystem& os, const string& name, const string& code) RamCheat::RamCheat(OSystem& os, const string& name, const string& code)
: Cheat(os, name, code), : Cheat(os, name, code),
address(uInt16(unhex(myCode.substr(0, 2)))), address{uInt16(unhex(myCode.substr(0, 2)))},
value(uInt8(unhex(myCode.substr(2, 2)))) value{uInt8(unhex(myCode.substr(2, 2)))}
{ {
} }

View File

@ -22,10 +22,10 @@ using std::lock_guard;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AudioQueue::AudioQueue(uInt32 fragmentSize, uInt32 capacity, bool isStereo) AudioQueue::AudioQueue(uInt32 fragmentSize, uInt32 capacity, bool isStereo)
: myFragmentSize(fragmentSize), : myFragmentSize{fragmentSize},
myIsStereo(isStereo), myIsStereo{isStereo},
myFragmentQueue(capacity), myFragmentQueue{capacity},
myAllFragments(capacity + 2) myAllFragments{capacity + 2}
{ {
const uInt8 sampleSize = myIsStereo ? 2 : 1; const uInt8 sampleSize = myIsStereo ? 2 : 1;
@ -48,7 +48,7 @@ uInt32 AudioQueue::capacity() const
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
uInt32 AudioQueue::size() uInt32 AudioQueue::size() const
{ {
lock_guard<mutex> guard(myMutex); lock_guard<mutex> guard(myMutex);

View File

@ -55,7 +55,7 @@ class AudioQueue
/** /**
Size getter. Size getter.
*/ */
uInt32 size(); uInt32 size() const;
/** /**
Stereo / mono getter. Stereo / mono getter.
@ -120,7 +120,7 @@ class AudioQueue
uInt32 myNextFragment{0}; uInt32 myNextFragment{0};
// We need a mutex for thread safety. // We need a mutex for thread safety.
std::mutex myMutex; mutable std::mutex myMutex;
// The first (empty) enqueue call returns this fragment. // The first (empty) enqueue call returns this fragment.
Int16* myFirstFragmentForEnqueue{nullptr}; Int16* myFirstFragmentForEnqueue{nullptr};

View File

@ -43,7 +43,7 @@ namespace {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AudioSettings::AudioSettings(Settings& settings) AudioSettings::AudioSettings(Settings& settings)
: mySettings(settings) : mySettings{settings}
{ {
setPreset(normalizedPreset(mySettings.getInt(SETTING_PRESET))); setPreset(normalizedPreset(mySettings.getInt(SETTING_PRESET)));
} }

View File

@ -129,13 +129,13 @@ class AudioSettings
Settings& mySettings; Settings& mySettings;
Preset myPreset; Preset myPreset{Preset::custom};
uInt32 myPresetSampleRate{0}; uInt32 myPresetSampleRate{0};
uInt32 myPresetFragmentSize{0}; uInt32 myPresetFragmentSize{0};
uInt32 myPresetBufferSize{0}; uInt32 myPresetBufferSize{0};
uInt32 myPresetHeadroom{0}; uInt32 myPresetHeadroom{0};
ResamplingQuality myPresetResamplingQuality; ResamplingQuality myPresetResamplingQuality{ResamplingQuality::nearestNeightbour};
bool myIsPersistent{true}; bool myIsPersistent{true};
}; };

View File

@ -23,7 +23,7 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
EventHandlerSDL2::EventHandlerSDL2(OSystem& osystem) EventHandlerSDL2::EventHandlerSDL2(OSystem& osystem)
: EventHandler(osystem) : EventHandler{osystem}
{ {
ASSERT_MAIN_THREAD; ASSERT_MAIN_THREAD;

View File

@ -31,7 +31,7 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FBBackendSDL2::FBBackendSDL2(OSystem& osystem) FBBackendSDL2::FBBackendSDL2(OSystem& osystem)
: myOSystem(osystem) : myOSystem{osystem}
{ {
ASSERT_MAIN_THREAD; ASSERT_MAIN_THREAD;

View File

@ -45,8 +45,8 @@ FBSurfaceSDL2::FBSurfaceSDL2(FBBackendSDL2& backend,
uInt32 width, uInt32 height, uInt32 width, uInt32 height,
ScalingInterpolation inter, ScalingInterpolation inter,
const uInt32* staticData) const uInt32* staticData)
: myBackend(backend), : myBackend{backend},
myInterpolationMode(inter) myInterpolationMode{inter}
{ {
createSurface(width, height, staticData); createSurface(width, height, staticData);
} }

View File

@ -94,8 +94,8 @@ FilesystemNodeZIP::FilesystemNodeZIP(const string& p)
FilesystemNodeZIP::FilesystemNodeZIP( FilesystemNodeZIP::FilesystemNodeZIP(
const string& zipfile, const string& virtualpath, const string& zipfile, const string& virtualpath,
const AbstractFSNodePtr& realnode, bool isdir) const AbstractFSNodePtr& realnode, bool isdir)
: _isDirectory(isdir), : _isDirectory{isdir},
_isFile(!isdir) _isFile{!isdir}
{ {
setFlags(zipfile, virtualpath, realnode); setFlags(zipfile, virtualpath, realnode);
} }

View File

@ -21,7 +21,7 @@ using namespace std::chrono;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FpsMeter::FpsMeter(uInt32 queueSize) FpsMeter::FpsMeter(uInt32 queueSize)
: myQueue(queueSize) : myQueue{queueSize}
{ {
reset(); reset();
} }

View File

@ -60,7 +60,7 @@ using Common::Base;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
HighScoresManager::HighScoresManager(OSystem& osystem) HighScoresManager::HighScoresManager(OSystem& osystem)
: myOSystem(osystem) : myOSystem{osystem}
{ {
} }

View File

@ -44,19 +44,19 @@ class JoyMap
explicit JoyMapping(EventMode c_mode, int c_button, explicit JoyMapping(EventMode c_mode, int c_button,
JoyAxis c_axis, JoyDir c_adir, JoyAxis c_axis, JoyDir c_adir,
int c_hat, JoyHatDir c_hdir) int c_hat, JoyHatDir c_hdir)
: mode(c_mode), button(c_button), : mode{c_mode}, button{c_button},
axis(c_axis), adir(c_adir), axis{c_axis}, adir{c_adir},
hat(c_hat), hdir(c_hdir) { } hat{c_hat}, hdir{c_hdir} { }
explicit JoyMapping(EventMode c_mode, int c_button, explicit JoyMapping(EventMode c_mode, int c_button,
JoyAxis c_axis, JoyDir c_adir) JoyAxis c_axis, JoyDir c_adir)
: mode(c_mode), button(c_button), : mode{c_mode}, button{c_button},
axis(c_axis), adir(c_adir), axis{c_axis}, adir{c_adir},
hat(JOY_CTRL_NONE), hdir(JoyHatDir::CENTER) { } hat{JOY_CTRL_NONE}, hdir{JoyHatDir::CENTER} { }
explicit JoyMapping(EventMode c_mode, int c_button, explicit JoyMapping(EventMode c_mode, int c_button,
int c_hat, JoyHatDir c_hdir) int c_hat, JoyHatDir c_hdir)
: mode(c_mode), button(c_button), : mode{c_mode}, button{c_button},
axis(JoyAxis::NONE), adir(JoyDir::NONE), axis{JoyAxis::NONE}, adir{JoyDir::NONE},
hat(c_hat), hdir(c_hdir) { } hat{c_hat}, hdir{c_hdir} { }
JoyMapping(const JoyMapping&) = default; JoyMapping(const JoyMapping&) = default;
JoyMapping& operator=(const JoyMapping&) = default; JoyMapping& operator=(const JoyMapping&) = default;

View File

@ -39,9 +39,9 @@ class KeyMap
StellaMod mod{StellaMod(0)}; StellaMod mod{StellaMod(0)};
explicit Mapping(EventMode c_mode, StellaKey c_key, StellaMod c_mod) 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) 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(const Mapping&) = default;
Mapping& operator=(const Mapping&) = default; Mapping& operator=(const Mapping&) = default;
Mapping(Mapping&&) = default; Mapping(Mapping&&) = default;

View File

@ -24,9 +24,9 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MouseControl::MouseControl(Console& console, const string& mode) MouseControl::MouseControl(Console& console, const string& mode)
: myProps(console.properties()), : myProps{console.properties()},
myLeftController(console.leftController()), myLeftController{console.leftController()},
myRightController(console.rightController()) myRightController{console.rightController()}
{ {
istringstream m_axis(mode); istringstream m_axis(mode);
string m_mode; string m_mode;

View File

@ -36,8 +36,8 @@ using json = nlohmann::json;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PhysicalJoystickHandler::PhysicalJoystickHandler( PhysicalJoystickHandler::PhysicalJoystickHandler(
OSystem& system, EventHandler& handler) OSystem& system, EventHandler& handler)
: myOSystem(system), : myOSystem{system},
myHandler(handler) myHandler{handler}
{ {
if(myOSystem.settings().getInt("event_ver") != Event::VERSION) { if(myOSystem.settings().getInt("event_ver") != Event::VERSION) {
Logger::info("event version mismatch; dropping previous joystick mappings"); Logger::info("event version mismatch; dropping previous joystick mappings");

View File

@ -50,7 +50,7 @@ class PhysicalJoystickHandler
struct StickInfo struct StickInfo
{ {
StickInfo(const nlohmann::json& map = nullptr, PhysicalJoystickPtr stick = nullptr) StickInfo(const nlohmann::json& map = nullptr, PhysicalJoystickPtr stick = nullptr)
: mapping(map), joy(std::move(stick)) {} : mapping{map}, joy{std::move(stick)} { }
nlohmann::json mapping; nlohmann::json mapping;
PhysicalJoystickPtr joy; PhysicalJoystickPtr joy;

View File

@ -1,5 +1,4 @@
//============================================================================ //============================================================================
//============================================================================
// //
// SSSS tt lll lll // SSSS tt lll lll
// SS SS tt ll ll // SS SS tt ll ll
@ -41,8 +40,8 @@ static constexpr int MOD3 = KBDM_ALT;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PhysicalKeyboardHandler::PhysicalKeyboardHandler(OSystem& system, EventHandler& handler) PhysicalKeyboardHandler::PhysicalKeyboardHandler(OSystem& system, EventHandler& handler)
: myOSystem(system), : myOSystem{system},
myHandler(handler) myHandler{handler}
{ {
Int32 version = myOSystem.settings().getInt("event_ver"); Int32 version = myOSystem.settings().getInt("event_ver");
bool updateDefaults = false; bool updateDefaults = false;

View File

@ -33,7 +33,7 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PNGLibrary::PNGLibrary(OSystem& osystem) PNGLibrary::PNGLibrary(OSystem& osystem)
: myOSystem(osystem) : myOSystem{osystem}
{ {
} }

View File

@ -24,7 +24,7 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PaletteHandler::PaletteHandler(OSystem& system) PaletteHandler::PaletteHandler(OSystem& system)
: myOSystem(system) : myOSystem{system}
{ {
// Load user-defined palette for this ROM // Load user-defined palette for this ROM
loadUserPalette(); loadUserPalette();

View File

@ -139,7 +139,7 @@ class PaletteHandler
float y{0.F}; float y{0.F};
explicit vector2d(float _x = 0.F, float _y = 0.F) explicit vector2d(float _x = 0.F, float _y = 0.F)
: x(_x), y(_y) { } : x{_x}, y{_y} { }
}; };
/** /**

View File

@ -32,6 +32,7 @@ namespace Common {
*/ */
struct Point struct Point
{ {
// FIXME : make this uInt32
Int32 x{0}; //!< The horizontal part of the point Int32 x{0}; //!< The horizontal part of the point
Int32 y{0}; //!< The vertical part of the point Int32 y{0}; //!< The vertical part of the point

View File

@ -28,8 +28,8 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
RewindManager::RewindManager(OSystem& system, StateManager& statemgr) RewindManager::RewindManager(OSystem& system, StateManager& statemgr)
: myOSystem(system), : myOSystem{system},
myStateManager(statemgr) myStateManager{statemgr}
{ {
setup(); setup();
} }

View File

@ -40,8 +40,8 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SoundSDL2::SoundSDL2(OSystem& osystem, AudioSettings& audioSettings) SoundSDL2::SoundSDL2(OSystem& osystem, AudioSettings& audioSettings)
: Sound(osystem), : Sound{osystem},
myAudioSettings(audioSettings) myAudioSettings{audioSettings}
{ {
ASSERT_MAIN_THREAD; ASSERT_MAIN_THREAD;

View File

@ -37,8 +37,8 @@ namespace {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
StaggeredLogger::StaggeredLogger(const string& message, Logger::Level level) StaggeredLogger::StaggeredLogger(const string& message, Logger::Level level)
: myMessage(message), : myMessage{message},
myLevel(level) myLevel{level}
{ {
} }

View File

@ -31,7 +31,7 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
StateManager::StateManager(OSystem& osystem) StateManager::StateManager(OSystem& osystem)
: myOSystem(osystem) : myOSystem{osystem}
{ {
myRewindManager = make_unique<RewindManager>(myOSystem, *this); myRewindManager = make_unique<RewindManager>(myOSystem, *this);
reset(); reset();

View File

@ -20,7 +20,7 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TimerManager::TimerManager() TimerManager::TimerManager()
: nextId(no_timer + 1), : nextId{no_timer + 1},
queue() queue()
{ {
} }

View File

@ -44,8 +44,8 @@ class Variant
public: public:
Variant() { } // NOLINT Variant() { } // NOLINT
Variant(const string& s) : data(s) { } Variant(const string& s) : data{s} { }
Variant(const char* s) : data(s) { } Variant(const char* s) : data{s} { }
Variant(Int32 i) { buf().str(""); buf() << i; data = buf().str(); } Variant(Int32 i) { buf().str(""); buf() << i; data = buf().str(); }
Variant(uInt32 i) { buf().str(""); buf() << i; data = buf().str(); } Variant(uInt32 i) { buf().str(""); buf() << i; data = buf().str(); }

View File

@ -19,9 +19,9 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ConvolutionBuffer::ConvolutionBuffer(uInt32 size) ConvolutionBuffer::ConvolutionBuffer(uInt32 size)
: mySize(size) : myData{make_unique<float[]>(size)},
mySize{size}
{ {
myData = make_unique<float[]>(mySize);
std::fill_n(myData.get(), mySize, 0.F); std::fill_n(myData.get(), mySize, 0.F);
} }

View File

@ -20,7 +20,7 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
HighPass::HighPass(float cutOffFrequency, float frequency) 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)}
{ {
} }

View File

@ -69,12 +69,12 @@ LanczosResampler::LanczosResampler(
// formatFrom.sampleRate / formatTo.sampleRate = M / N // formatFrom.sampleRate / formatTo.sampleRate = M / N
// //
// -> we find N from fully reducing the fraction. // -> we find N from fully reducing the fraction.
myPrecomputedKernelCount(reducedDenominator(formatFrom.sampleRate, formatTo.sampleRate)), myPrecomputedKernelCount{reducedDenominator(formatFrom.sampleRate, formatTo.sampleRate)},
myKernelSize(2 * kernelParameter), myKernelSize{2 * kernelParameter},
myKernelParameter(kernelParameter), myKernelParameter{kernelParameter},
myHighPassL(HIGH_PASS_CUT_OFF, float(formatFrom.sampleRate)), myHighPassL{HIGH_PASS_CUT_OFF, float(formatFrom.sampleRate)},
myHighPassR(HIGH_PASS_CUT_OFF, float(formatFrom.sampleRate)), myHighPassR{HIGH_PASS_CUT_OFF, float(formatFrom.sampleRate)},
myHighPass(HIGH_PASS_CUT_OFF, float(formatFrom.sampleRate)) myHighPass{HIGH_PASS_CUT_OFF, float(formatFrom.sampleRate)}
{ {
myPrecomputedKernels = make_unique<float[]>(myPrecomputedKernelCount * myKernelSize); myPrecomputedKernels = make_unique<float[]>(myPrecomputedKernelCount * myKernelSize);

View File

@ -51,12 +51,11 @@ class Resampler {
public: public:
Resampler(Format formatFrom, Format formatTo, Resampler(Format formatFrom, Format formatTo,
const NextFragmentCallback& nextFragmentCallback) : const NextFragmentCallback& nextFragmentCallback)
myFormatFrom(formatFrom), : myFormatFrom{formatFrom},
myFormatTo(formatTo), myFormatTo{formatTo},
myNextFragmentCallback(nextFragmentCallback), myNextFragmentCallback{nextFragmentCallback},
myUnderrunLogger("audio buffer underrun", Logger::Level::INFO) myUnderrunLogger{"audio buffer underrun", Logger::Level::INFO} { }
{}
virtual void fillFragment(float* fragment, uInt32 length) = 0; virtual void fillFragment(float* fragment, uInt32 length) = 0;

View File

@ -39,13 +39,11 @@ class SimpleResampler : public Resampler
bool myIsUnderrun{true}; bool myIsUnderrun{true};
private: private:
SimpleResampler() = delete; SimpleResampler() = delete;
SimpleResampler(const SimpleResampler&) = delete; SimpleResampler(const SimpleResampler&) = delete;
SimpleResampler(SimpleResampler&&) = delete; SimpleResampler(SimpleResampler&&) = delete;
SimpleResampler& operator=(const SimpleResampler&) = delete; SimpleResampler& operator=(const SimpleResampler&) = delete;
SimpleResampler& operator=(const SimpleResampler&&) = delete; SimpleResampler& operator=(const SimpleResampler&&) = delete;
}; };
#endif // SIMPLE_RESAMPLER_HXX #endif // SIMPLE_RESAMPLER_HXX

View File

@ -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 #ifndef JSON_DEFINITIONS_HXX
#define JSON_DEFINITIONS_HXX #define JSON_DEFINITIONS_HXX

View File

@ -29,7 +29,7 @@ namespace {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyValueRepositoryConfigfile::KeyValueRepositoryConfigfile(const FilesystemNode& file) KeyValueRepositoryConfigfile::KeyValueRepositoryConfigfile(const FilesystemNode& file)
: myFile(file) : myFile{file}
{ {
} }

View File

@ -22,10 +22,9 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyValueRepositorySqlite::KeyValueRepositorySqlite( KeyValueRepositorySqlite::KeyValueRepositorySqlite(
SqliteDatabase& db, SqliteDatabase& db, const string& tableName)
const string& tableName : myTableName{tableName},
) : myTableName(tableName), myDb{db}
myDb(db)
{ {
} }

View File

@ -20,12 +20,11 @@
#include "SqliteError.hxx" #include "SqliteError.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SettingsDb::SettingsDb( SettingsDb::SettingsDb(const string& databaseDirectory, const string& databaseName)
const string& databaseDirectory, : myDatabaseDirectory{databaseDirectory},
const string& databaseName myDatabaseName{databaseName}
) : myDatabaseDirectory(databaseDirectory), {
myDatabaseName(databaseName) }
{}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool SettingsDb::initialize() bool SettingsDb::initialize()

View File

@ -30,7 +30,7 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SqliteDatabase::SqliteDatabase(const string& databaseDirectory, SqliteDatabase::SqliteDatabase(const string& databaseDirectory,
const string& databaseName) const string& databaseName)
: myDatabaseFile(databaseDirectory + SEPARATOR + databaseName + ".sqlite3") : myDatabaseFile{databaseDirectory + SEPARATOR + databaseName + ".sqlite3"}
{ {
} }

View File

@ -19,7 +19,7 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SqliteStatement::SqliteStatement(sqlite3* handle, string sql) SqliteStatement::SqliteStatement(sqlite3* handle, string sql)
: myHandle(handle) : myHandle{handle}
{ {
if (sqlite3_prepare_v2(handle, sql.c_str(), -1, &myStmt, nullptr) != SQLITE_OK) if (sqlite3_prepare_v2(handle, sql.c_str(), -1, &myStmt, nullptr) != SQLITE_OK)
throw SqliteError(handle); throw SqliteError(handle);

View File

@ -20,7 +20,7 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SqliteTransaction::SqliteTransaction(SqliteDatabase& db) SqliteTransaction::SqliteTransaction(SqliteDatabase& db)
: myDb(db) : myDb{db}
{ {
myDb.exec("BEGIN TRANSACTION"); myDb.exec("BEGIN TRANSACTION");
} }

View File

@ -21,8 +21,8 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
BilinearBlitter::BilinearBlitter(FBBackendSDL2& fb, bool interpolate) BilinearBlitter::BilinearBlitter(FBBackendSDL2& fb, bool interpolate)
: myFB(fb), : myFB{fb},
myInterpolate(interpolate) myInterpolate{interpolate}
{ {
} }

View File

@ -21,7 +21,8 @@
#include "BilinearBlitter.hxx" #include "BilinearBlitter.hxx"
#include "QisBlitter.hxx" #include "QisBlitter.hxx"
unique_ptr<Blitter> BlitterFactory::createBlitter(FBBackendSDL2& fb, ScalingAlgorithm scaling) unique_ptr<Blitter>
BlitterFactory::createBlitter(FBBackendSDL2& fb, ScalingAlgorithm scaling)
{ {
if (!fb.isInitialized()) { if (!fb.isInitialized()) {
throw runtime_error("BlitterFactory requires an initialized framebuffer!"); throw runtime_error("BlitterFactory requires an initialized framebuffer!");

View File

@ -21,7 +21,7 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
QisBlitter::QisBlitter(FBBackendSDL2& fb) QisBlitter::QisBlitter(FBBackendSDL2& fb)
: myFB(fb) : myFB{fb}
{ {
} }

View File

@ -48,7 +48,7 @@ using std::right;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartDebug::CartDebug(Debugger& dbg, Console& console, const OSystem& osystem) CartDebug::CartDebug(Debugger& dbg, Console& console, const OSystem& osystem)
: DebuggerSystem(dbg, console), : DebuggerSystem(dbg, console),
myOSystem(osystem) myOSystem{osystem}
{ {
// Add case sensitive compare for user labels // Add case sensitive compare for user labels
// TODO - should user labels be case insensitive too? // TODO - should user labels be case insensitive too?

View File

@ -27,7 +27,7 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CpuDebug::CpuDebug(Debugger& dbg, Console& console) CpuDebug::CpuDebug(Debugger& dbg, Console& console)
: DebuggerSystem(dbg, console), : DebuggerSystem(dbg, console),
my6502(mySystem.m6502()) my6502{mySystem.m6502()}
{ {
} }

View File

@ -62,8 +62,8 @@ Debugger* Debugger::myStaticDebugger = nullptr;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Debugger::Debugger(OSystem& osystem, Console& console) Debugger::Debugger(OSystem& osystem, Console& console)
: DialogContainer(osystem), : DialogContainer(osystem),
myConsole(console), myConsole{console},
mySystem(console.system()) mySystem{console.system()}
{ {
// Init parser // Init parser
myParser = make_unique<DebuggerParser>(*this, osystem.settings()); myParser = make_unique<DebuggerParser>(*this, osystem.settings());

View File

@ -91,7 +91,7 @@ class ByteDerefOffsetExpression : public Expression
class ConstExpression : public Expression class ConstExpression : public Expression
{ {
public: public:
ConstExpression(const int value) : Expression(), myValue(value) { } ConstExpression(const int value) : Expression(), myValue{value} { }
Int32 evaluate() const override Int32 evaluate() const override
{ return myValue; } { return myValue; }
@ -103,7 +103,7 @@ class ConstExpression : public Expression
class CpuMethodExpression : public Expression class CpuMethodExpression : public Expression
{ {
public: public:
CpuMethodExpression(CpuMethod method) : Expression(), myMethod(std::mem_fn(method)) { } CpuMethodExpression(CpuMethod method) : Expression(), myMethod{std::mem_fn(method)} { }
Int32 evaluate() const override Int32 evaluate() const override
{ return myMethod(Debugger::debugger().cpuDebug()); } { return myMethod(Debugger::debugger().cpuDebug()); }
@ -134,7 +134,7 @@ class EqualsExpression : public Expression
class EquateExpression : public Expression class EquateExpression : public Expression
{ {
public: public:
EquateExpression(const string& label) : Expression(), myLabel(label) { } EquateExpression(const string& label) : Expression(), myLabel{label} { }
Int32 evaluate() const override Int32 evaluate() const override
{ return Debugger::debugger().cartDebug().getAddress(myLabel); } { return Debugger::debugger().cartDebug().getAddress(myLabel); }
@ -146,7 +146,7 @@ class EquateExpression : public Expression
class FunctionExpression : public Expression class FunctionExpression : public Expression
{ {
public: public:
FunctionExpression(const string& label) : Expression(), myLabel(label) { } FunctionExpression(const string& label) : Expression(), myLabel{label} { }
Int32 evaluate() const override Int32 evaluate() const override
{ return Debugger::debugger().getFunction(myLabel).evaluate(); } { return Debugger::debugger().getFunction(myLabel).evaluate(); }
@ -285,7 +285,7 @@ class PlusExpression : public Expression
class CartMethodExpression : public Expression class CartMethodExpression : public Expression
{ {
public: public:
CartMethodExpression(CartMethod method) : Expression(), myMethod(std::mem_fn(method)) { } CartMethodExpression(CartMethod method) : Expression(), myMethod{std::mem_fn(method)} { }
Int32 evaluate() const override Int32 evaluate() const override
{ return myMethod(Debugger::debugger().cartDebug()); } { return myMethod(Debugger::debugger().cartDebug()); }
@ -315,7 +315,7 @@ class ShiftRightExpression : public Expression
class RiotMethodExpression : public Expression class RiotMethodExpression : public Expression
{ {
public: public:
RiotMethodExpression(RiotMethod method) : Expression(), myMethod(std::mem_fn(method)) { } RiotMethodExpression(RiotMethod method) : Expression(), myMethod{std::mem_fn(method)} { }
Int32 evaluate() const override Int32 evaluate() const override
{ return myMethod(Debugger::debugger().riotDebug()); } { return myMethod(Debugger::debugger().riotDebug()); }
@ -327,7 +327,7 @@ class RiotMethodExpression : public Expression
class TiaMethodExpression : public Expression class TiaMethodExpression : public Expression
{ {
public: public:
TiaMethodExpression(TiaMethod method) : Expression(), myMethod(std::mem_fn(method)) { } TiaMethodExpression(TiaMethod method) : Expression(), myMethod{std::mem_fn(method)} { }
Int32 evaluate() const override Int32 evaluate() const override
{ return myMethod(Debugger::debugger().tiaDebug()); } { return myMethod(Debugger::debugger().tiaDebug()); }

View File

@ -57,8 +57,8 @@ using std::right;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DebuggerParser::DebuggerParser(Debugger& d, Settings& s) DebuggerParser::DebuggerParser(Debugger& d, Settings& s)
: debugger(d), : debugger{d},
settings(s) settings{s}
{ {
} }

View File

@ -27,12 +27,12 @@ DiStella::DiStella(const CartDebug& dbg, CartDebug::DisassemblyList& list,
CartDebug::AddrTypeArray& labels, CartDebug::AddrTypeArray& labels,
CartDebug::AddrTypeArray& directives, CartDebug::AddrTypeArray& directives,
CartDebug::ReservedEquates& reserved) CartDebug::ReservedEquates& reserved)
: myDbg(dbg), : myDbg{dbg},
myList(list), myList{list},
mySettings(s), mySettings{s},
myReserved(reserved), myReserved{reserved},
myLabels(labels), myLabels{labels},
myDirectives(directives) myDirectives{directives}
{ {
bool resolve_code = mySettings.resolveCode; bool resolve_code = mySettings.resolveCode;
CartDebug::AddressList& debuggerAddresses = info.addressList; CartDebug::AddressList& debuggerAddresses = info.addressList;

View File

@ -32,7 +32,7 @@ class Expression
{ {
public: public:
Expression(Expression* lhs = nullptr, Expression* rhs = nullptr) Expression(Expression* lhs = nullptr, Expression* rhs = nullptr)
: myLHS(lhs), myRHS(rhs) { } : myLHS{lhs}, myRHS{rhs} { }
virtual ~Expression() = default; virtual ~Expression() = default;
virtual Int32 evaluate() const { return 0; } virtual Int32 evaluate() const { return 0; }

View File

@ -26,7 +26,7 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TIADebug::TIADebug(Debugger& dbg, Console& console) TIADebug::TIADebug(Debugger& dbg, Console& console)
: DebuggerSystem(dbg, console), : DebuggerSystem(dbg, console),
myTIA(console.tia()) myTIA{console.tia()}
{ {
} }

View File

@ -25,7 +25,7 @@ Cartridge3EPlusWidget::Cartridge3EPlusWidget(
GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, Cartridge3EPlus& cart) int x, int y, int w, int h, Cartridge3EPlus& cart)
: CartridgeEnhancedWidget(boss, lfont, nfont, x, y, w, h, cart), : CartridgeEnhancedWidget(boss, lfont, nfont, x, y, w, h, cart),
myCart3EP(cart) myCart3EP{cart}
{ {
initialize(); initialize();
} }

View File

@ -24,7 +24,7 @@ Cartridge4A50Widget::Cartridge4A50Widget(
GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, Cartridge4A50& cart) int x, int y, int w, int h, Cartridge4A50& cart)
: CartDebugWidget(boss, lfont, nfont, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart{cart}
{ {
string info = string info =
"4A50 cartridge - 128K ROM and 32K RAM, split in various bank configurations\n" "4A50 cartridge - 128K ROM and 32K RAM, split in various bank configurations\n"

View File

@ -27,7 +27,7 @@ CartridgeARWidget::CartridgeARWidget(
GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeAR& cart) int x, int y, int w, int h, CartridgeAR& cart)
: CartDebugWidget(boss, lfont, nfont, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart{cart}
{ {
size_t size = myCart.mySize; size_t size = myCart.mySize;

View File

@ -25,7 +25,7 @@ CartridgeBUSWidget::CartridgeBUSWidget(
GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeBUS& cart) int x, int y, int w, int h, CartridgeBUS& cart)
: CartDebugWidget(boss, lfont, nfont, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart{cart}
{ {
uInt16 size = 8 * 4096; uInt16 size = 8 * 4096;

View File

@ -24,7 +24,7 @@ CartridgeCDFWidget::CartridgeCDFWidget(
GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeCDF& cart) int x, int y, int w, int h, CartridgeCDF& cart)
: CartDebugWidget(boss, lfont, nfont, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart{cart}
{ {
const int VBORDER = 8; const int VBORDER = 8;
const int HBORDER = 2; const int HBORDER = 2;

View File

@ -31,7 +31,7 @@ CartridgeCMWidget::CartridgeCMWidget(
GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeCM& cart) int x, int y, int w, int h, CartridgeCM& cart)
: CartDebugWidget(boss, lfont, nfont, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart{cart}
{ {
uInt16 size = 4 * 4096; uInt16 size = 4 * 4096;

View File

@ -27,7 +27,7 @@ CartridgeCTYWidget::CartridgeCTYWidget(
GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeCTY& cart) int x, int y, int w, int h, CartridgeCTY& cart)
: CartDebugWidget(boss, lfont, nfont, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart{cart}
{ {
uInt16 size = 8 * 4096; uInt16 size = 8 * 4096;

View File

@ -25,7 +25,7 @@ CartridgeDPCPlusWidget::CartridgeDPCPlusWidget(
GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeDPCPlus& cart) int x, int y, int w, int h, CartridgeDPCPlus& cart)
: CartDebugWidget(boss, lfont, nfont, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart{cart}
{ {
size_t size = cart.mySize; size_t size = cart.mySize;

View File

@ -25,7 +25,7 @@ CartridgeDPCWidget::CartridgeDPCWidget(
GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeDPC& cart) int x, int y, int w, int h, CartridgeDPC& cart)
: CartDebugWidget(boss, lfont, nfont, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart{cart}
{ {
const int V_GAP = 4; const int V_GAP = 4;
size_t size = cart.mySize; size_t size = cart.mySize;

View File

@ -29,11 +29,11 @@ CartDebugWidget::CartDebugWidget(GuiObject* boss, const GUI::Font& lfont,
int x, int y, int w, int h) int x, int y, int w, int h)
: Widget(boss, lfont, x, y, w, h), : Widget(boss, lfont, x, y, w, h),
CommandSender(boss), CommandSender(boss),
_nfont(nfont), _nfont{nfont},
myFontWidth(lfont.getMaxCharWidth()), myFontWidth{lfont.getMaxCharWidth()},
myFontHeight(lfont.getFontHeight()), myFontHeight{lfont.getFontHeight()},
myLineHeight(lfont.getLineHeight()), myLineHeight{lfont.getLineHeight()},
myButtonHeight(myLineHeight + 4) myButtonHeight{myLineHeight + 4}
{ {
} }

View File

@ -28,7 +28,7 @@ CartridgeEnhancedWidget::CartridgeEnhancedWidget(GuiObject* boss, const GUI::Fon
int x, int y, int w, int h, int x, int y, int w, int h,
CartridgeEnhanced& cart) CartridgeEnhanced& cart)
: CartDebugWidget(boss, lfont, nfont, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart{cart}
{ {
} }

View File

@ -23,7 +23,7 @@ CartridgeFA2Widget::CartridgeFA2Widget(
GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeFA2& cart) int x, int y, int w, int h, CartridgeFA2& cart)
: CartridgeEnhancedWidget(boss, lfont, nfont, x, y, w, h, cart), : CartridgeEnhancedWidget(boss, lfont, nfont, x, y, w, h, cart),
myCartFA2(cart) myCartFA2{cart}
{ {
int xpos = 2, int xpos = 2,
ypos = initialize(); ypos = initialize();

View File

@ -24,7 +24,7 @@ CartridgeMDMWidget::CartridgeMDMWidget(
GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeMDM& cart) int x, int y, int w, int h, CartridgeMDM& cart)
: CartridgeEnhancedWidget(boss, lfont, nfont, x, y, w, h, cart), : CartridgeEnhancedWidget(boss, lfont, nfont, x, y, w, h, cart),
myCartMDM(cart) myCartMDM{cart}
{ {
initialize(); initialize();
} }

View File

@ -26,7 +26,7 @@ CartridgeMNetworkWidget::CartridgeMNetworkWidget(
int x, int y, int w, int h, int x, int y, int w, int h,
CartridgeMNetwork& cart) CartridgeMNetwork& cart)
: CartDebugWidget(boss, lfont, nfont, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart{cart}
{ {
} }

View File

@ -33,11 +33,11 @@ CartRamWidget::CartRamWidget(
int x, int y, int w, int h, CartDebugWidget& cartDebug) int x, int y, int w, int h, CartDebugWidget& cartDebug)
: Widget(boss, lfont, x, y, w, h), : Widget(boss, lfont, x, y, w, h),
CommandSender(boss), CommandSender(boss),
_nfont(nfont), _nfont{nfont},
myFontWidth(lfont.getMaxCharWidth()), myFontWidth{lfont.getMaxCharWidth()},
myFontHeight(lfont.getFontHeight()), myFontHeight{lfont.getFontHeight()},
myLineHeight(lfont.getLineHeight()), myLineHeight{lfont.getLineHeight()},
myButtonHeight(myLineHeight + 4) myButtonHeight{myLineHeight + 4}
{ {
int lwidth = lfont.getStringWidth("Description "), int lwidth = lfont.getStringWidth("Description "),
fwidth = w - lwidth - 20; fwidth = w - lwidth - 20;

View File

@ -24,7 +24,7 @@ CartridgeTVBoyWidget::CartridgeTVBoyWidget(
GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeTVBoy& cart) int x, int y, int w, int h, CartridgeTVBoy& cart)
: CartridgeEnhancedWidget(boss, lfont, nfont, x, y, w, h, cart), : CartridgeEnhancedWidget(boss, lfont, nfont, x, y, w, h, cart),
myCartTVBoy(cart) myCartTVBoy{cart}
{ {
initialize(); initialize();
} }

View File

@ -23,7 +23,7 @@ CartridgeUAWidget::CartridgeUAWidget(
GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeUA& cart, bool swapHotspots) int x, int y, int w, int h, CartridgeUA& cart, bool swapHotspots)
: CartridgeEnhancedWidget(boss, lfont, nfont, x, y, w, h, cart), : CartridgeEnhancedWidget(boss, lfont, nfont, x, y, w, h, cart),
mySwappedHotspots(swapHotspots) mySwappedHotspots{swapHotspots}
{ {
myHotspotDelta = 0x20; myHotspotDelta = 0x20;
initialize(); initialize();

View File

@ -23,7 +23,7 @@ CartridgeWDWidget::CartridgeWDWidget(
GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeWD& cart) int x, int y, int w, int h, CartridgeWD& cart)
: CartridgeEnhancedWidget(boss, lfont, nfont, x, y, w, h, cart), : CartridgeEnhancedWidget(boss, lfont, nfont, x, y, w, h, cart),
myCartWD(cart) myCartWD{cart}
{ {
initialize(); initialize();
} }

View File

@ -27,7 +27,7 @@ DataGridRamWidget::DataGridRamWidget(GuiObject* boss, const RamWidget& ram,
bool useScrollbar) bool useScrollbar)
: DataGridWidget(boss, font, x, y, cols, rows, colchars, : DataGridWidget(boss, font, x, y, cols, rows, colchars,
bits, base, useScrollbar), bits, base, useScrollbar),
_ram(ram) _ram{ram}
{ {
} }

View File

@ -38,12 +38,12 @@ DataGridWidget::DataGridWidget(GuiObject* boss, const GUI::Font& font,
: EditableWidget(boss, font, x, y, : EditableWidget(boss, font, x, y,
cols*(colchars * font.getMaxCharWidth() + 8) + 1, cols*(colchars * font.getMaxCharWidth() + 8) + 1,
font.getLineHeight()*rows + 1), font.getLineHeight()*rows + 1),
_rows(rows), _rows{rows},
_cols(cols), _cols{cols},
_rowHeight(font.getLineHeight()), _rowHeight{font.getLineHeight()},
_colWidth(colchars * font.getMaxCharWidth() + 8), _colWidth{colchars * font.getMaxCharWidth() + 8},
_bits(bits), _bits{bits},
_base(base) _base{base}
{ {
_flags = Widget::FLAG_ENABLED | Widget::FLAG_RETAIN_FOCUS | Widget::FLAG_WANTS_RAWDATA; _flags = Widget::FLAG_ENABLED | Widget::FLAG_RETAIN_FOCUS | Widget::FLAG_WANTS_RAWDATA;
_editMode = false; _editMode = false;

View File

@ -41,12 +41,12 @@ PromptWidget::PromptWidget(GuiObject* boss, const GUI::Font& font,
int x, int y, int w, int h) int x, int y, int w, int h)
: Widget(boss, font, x, y, w - ScrollBarWidget::scrollBarWidth(font), h), : Widget(boss, font, x, y, w - ScrollBarWidget::scrollBarWidth(font), h),
CommandSender(boss), CommandSender(boss),
_historySize(0), _historySize{0},
_historyIndex(0), _historyIndex{0},
_historyLine(0), _historyLine{0},
_makeDirty(false), _makeDirty{false},
_firstTime(true), _firstTime{true},
_exitedEarly(false) _exitedEarly{false}
{ {
_flags = Widget::FLAG_ENABLED | Widget::FLAG_CLEARBG | Widget::FLAG_RETAIN_FOCUS | _flags = Widget::FLAG_ENABLED | Widget::FLAG_CLEARBG | Widget::FLAG_RETAIN_FOCUS |
Widget::FLAG_WANTS_TAB | Widget::FLAG_WANTS_RAWDATA; Widget::FLAG_WANTS_TAB | Widget::FLAG_WANTS_RAWDATA;

View File

@ -33,14 +33,14 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
uInt32 ramsize, uInt32 numrows, uInt32 pagesize) uInt32 ramsize, uInt32 numrows, uInt32 pagesize)
: Widget(boss, lfont, x, y, w, h), : Widget(boss, lfont, x, y, w, h),
CommandSender(boss), CommandSender(boss),
_nfont(nfont), _nfont{nfont},
myFontWidth(lfont.getMaxCharWidth()), myFontWidth{lfont.getMaxCharWidth()},
myFontHeight(lfont.getFontHeight()), myFontHeight{lfont.getFontHeight()},
myLineHeight(lfont.getLineHeight()), myLineHeight{lfont.getLineHeight()},
myButtonHeight(myLineHeight * 1.25), myButtonHeight{static_cast<int>(myLineHeight * 1.25)},
myRamSize(ramsize), myRamSize{ramsize},
myNumRows(numrows), myNumRows{numrows},
myPageSize(pagesize) myPageSize{pagesize}
{ {
const int bwidth = lfont.getStringWidth("Compare " + ELLIPSIS), const int bwidth = lfont.getStringWidth("Compare " + ELLIPSIS),
bheight = myLineHeight + 2; bheight = myLineHeight + 2;

View File

@ -25,7 +25,7 @@
RiotRamWidget::RiotRamWidget(GuiObject* boss, const GUI::Font& lfont, RiotRamWidget::RiotRamWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont, int x, int y, int w) const GUI::Font& nfont, int x, int y, int w)
: RamWidget(boss, lfont, nfont, x, y, w, 0, 128, 8, 128), : RamWidget(boss, lfont, nfont, x, y, w, 0, 128, 8, 128),
myDbg(instance().debugger().cartDebug()) myDbg{instance().debugger().cartDebug()}
{ {
} }

View File

@ -28,7 +28,7 @@ ToggleBitWidget::ToggleBitWidget(GuiObject* boss, const GUI::Font& font,
int x, int y, int cols, int rows, int colchars, int x, int y, int cols, int rows, int colchars,
const StringList& labels) const StringList& labels)
: ToggleWidget(boss, font, x, y, cols, rows), : ToggleWidget(boss, font, x, y, cols, rows),
_labelList(labels) _labelList{labels}
{ {
_rowHeight = font.getLineHeight(); _rowHeight = font.getLineHeight();
_colWidth = colchars * font.getMaxCharWidth() + 8; _colWidth = colchars * font.getMaxCharWidth() + 8;

View File

@ -28,9 +28,9 @@ ToggleWidget::ToggleWidget(GuiObject* boss, const GUI::Font& font,
int x, int y, int cols, int rows, int shiftBits) int x, int y, int cols, int rows, int shiftBits)
: Widget(boss, font, x, y, 16, 16), : Widget(boss, font, x, y, 16, 16),
CommandSender(boss), CommandSender(boss),
_rows(rows), _rows{rows},
_cols(cols), _cols{cols},
_shiftBits(shiftBits) _shiftBits{shiftBits}
{ {
_flags = Widget::FLAG_ENABLED | Widget::FLAG_CLEARBG | Widget::FLAG_RETAIN_FOCUS | _flags = Widget::FLAG_ENABLED | Widget::FLAG_CLEARBG | Widget::FLAG_RETAIN_FOCUS |
Widget::FLAG_WANTS_RAWDATA; Widget::FLAG_WANTS_RAWDATA;