mirror of https://github.com/stella-emu/stella.git
Yet more fixes for warnings from cppcheck.
This commit is contained in:
parent
7e4dc350f0
commit
0f8dc1f2bb
|
@ -37,7 +37,7 @@ using CheatList = vector<shared_ptr<Cheat>>;
|
||||||
class CheatManager
|
class CheatManager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CheatManager(OSystem& osystem);
|
explicit CheatManager(OSystem& osystem);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Adds the specified cheat to an internal list.
|
Adds the specified cheat to an internal list.
|
||||||
|
|
|
@ -67,7 +67,7 @@ class AudioSettings
|
||||||
|
|
||||||
AudioSettings();
|
AudioSettings();
|
||||||
|
|
||||||
AudioSettings(Settings* mySettings);
|
explicit AudioSettings(Settings* mySettings);
|
||||||
|
|
||||||
static void normalize(Settings& settings);
|
static void normalize(Settings& settings);
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ class EventHandlerSDL2 : public EventHandler
|
||||||
/**
|
/**
|
||||||
Create a new SDL2 event handler object
|
Create a new SDL2 event handler object
|
||||||
*/
|
*/
|
||||||
EventHandlerSDL2(OSystem& osystem);
|
explicit EventHandlerSDL2(OSystem& osystem);
|
||||||
virtual ~EventHandlerSDL2() = default;
|
virtual ~EventHandlerSDL2() = default;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -57,7 +57,7 @@ class EventHandlerSDL2 : public EventHandler
|
||||||
class JoystickSDL2 : public PhysicalJoystick
|
class JoystickSDL2 : public PhysicalJoystick
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
JoystickSDL2(int idx);
|
explicit JoystickSDL2(int idx);
|
||||||
virtual ~JoystickSDL2();
|
virtual ~JoystickSDL2();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -43,7 +43,7 @@ class FilesystemNodeZIP : public AbstractFSNode
|
||||||
*
|
*
|
||||||
* @param path String with the path the new node should point to.
|
* @param path String with the path the new node should point to.
|
||||||
*/
|
*/
|
||||||
FilesystemNodeZIP(const string& path);
|
explicit FilesystemNodeZIP(const string& path);
|
||||||
|
|
||||||
bool exists() const override { return _realNode && _realNode->exists(); }
|
bool exists() const override { return _realNode && _realNode->exists(); }
|
||||||
const string& getName() const override { return _name; }
|
const string& getName() const override { return _name; }
|
||||||
|
|
|
@ -26,7 +26,7 @@ class FpsMeter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
FpsMeter(uInt32 queueSize);
|
explicit FpsMeter(uInt32 queueSize);
|
||||||
|
|
||||||
void reset(uInt32 garbageFrameLimit = 0);
|
void reset(uInt32 garbageFrameLimit = 0);
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ class FrameBufferSDL2 : public FrameBuffer
|
||||||
/**
|
/**
|
||||||
Creates a new SDL2 framebuffer
|
Creates a new SDL2 framebuffer
|
||||||
*/
|
*/
|
||||||
FrameBufferSDL2(OSystem& osystem);
|
explicit FrameBufferSDL2(OSystem& osystem);
|
||||||
virtual ~FrameBufferSDL2();
|
virtual ~FrameBufferSDL2();
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -80,7 +80,7 @@ class MouseControl
|
||||||
int xid, yid;
|
int xid, yid;
|
||||||
string message;
|
string message;
|
||||||
|
|
||||||
MouseMode(const string& msg = "")
|
explicit MouseMode(const string& msg = "")
|
||||||
: xtype(Controller::Joystick),
|
: xtype(Controller::Joystick),
|
||||||
ytype(Controller::Joystick),
|
ytype(Controller::Joystick),
|
||||||
xid(-1),
|
xid(-1),
|
||||||
|
|
|
@ -37,7 +37,7 @@ class Properties;
|
||||||
class PNGLibrary
|
class PNGLibrary
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PNGLibrary(OSystem& osystem);
|
explicit PNGLibrary(OSystem& osystem);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Read a PNG image from the specified file into a FBSurface structure,
|
Read a PNG image from the specified file into a FBSurface structure,
|
||||||
|
|
|
@ -37,7 +37,7 @@ class SoundNull : public Sound
|
||||||
Create a new sound object. The init method must be invoked before
|
Create a new sound object. The init method must be invoked before
|
||||||
using the object.
|
using the object.
|
||||||
*/
|
*/
|
||||||
SoundNull(OSystem& osystem) : Sound(osystem)
|
explicit SoundNull(OSystem& osystem) : Sound(osystem)
|
||||||
{
|
{
|
||||||
myOSystem.logMessage("Sound disabled.\n", 1);
|
myOSystem.logMessage("Sound disabled.\n", 1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ class StateManager
|
||||||
/**
|
/**
|
||||||
Create a new statemananger class.
|
Create a new statemananger class.
|
||||||
*/
|
*/
|
||||||
StateManager(OSystem& osystem);
|
explicit StateManager(OSystem& osystem);
|
||||||
~StateManager();
|
~StateManager();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -34,7 +34,7 @@ class StringParser
|
||||||
|
|
||||||
@param str The string to split
|
@param str The string to split
|
||||||
*/
|
*/
|
||||||
StringParser(const string& str)
|
explicit StringParser(const string& str)
|
||||||
{
|
{
|
||||||
istringstream buf(str);
|
istringstream buf(str);
|
||||||
string line;
|
string line;
|
||||||
|
|
|
@ -24,7 +24,7 @@ class ConvolutionBuffer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
ConvolutionBuffer(uInt32 size);
|
explicit ConvolutionBuffer(uInt32 size);
|
||||||
|
|
||||||
void shift(float nextValue);
|
void shift(float nextValue);
|
||||||
|
|
||||||
|
|
|
@ -261,7 +261,7 @@ class FilesystemNode
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AbstractFSNodePtr _realNode;
|
AbstractFSNodePtr _realNode;
|
||||||
FilesystemNode(AbstractFSNodePtr realNode);
|
explicit FilesystemNode(AbstractFSNodePtr realNode);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ class M6502 : public Serializable
|
||||||
/**
|
/**
|
||||||
Create a new 6502 microprocessor.
|
Create a new 6502 microprocessor.
|
||||||
*/
|
*/
|
||||||
M6502(const Settings& settings);
|
explicit M6502(const Settings& settings);
|
||||||
virtual ~M6502() = default;
|
virtual ~M6502() = default;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -42,7 +42,7 @@ class PropertiesSet
|
||||||
/**
|
/**
|
||||||
Create a properties set object from the specified properties file.
|
Create a properties set object from the specified properties file.
|
||||||
*/
|
*/
|
||||||
PropertiesSet(const string& propsfile);
|
explicit PropertiesSet(const string& propsfile);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -34,7 +34,7 @@ class Random : public Serializable
|
||||||
/**
|
/**
|
||||||
Create a new random number generator
|
Create a new random number generator
|
||||||
*/
|
*/
|
||||||
Random(uInt32 seed) { initSeed(seed); }
|
explicit Random(uInt32 seed) { initSeed(seed); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Re-initialize the random number generator with a new seed,
|
Re-initialize the random number generator with a new seed,
|
||||||
|
|
|
@ -36,7 +36,7 @@ class Settings
|
||||||
/**
|
/**
|
||||||
Create a new settings abstract class
|
Create a new settings abstract class
|
||||||
*/
|
*/
|
||||||
Settings(OSystem& osystem);
|
explicit Settings(OSystem& osystem);
|
||||||
virtual ~Settings() = default;
|
virtual ~Settings() = default;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -47,7 +47,7 @@ class TIASurface
|
||||||
/**
|
/**
|
||||||
Creates a new TIASurface object
|
Creates a new TIASurface object
|
||||||
*/
|
*/
|
||||||
TIASurface(OSystem& system);
|
explicit TIASurface(OSystem& system);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Set the TIA object, which is needed for actually rendering the TIA image.
|
Set the TIA object, which is needed for actually rendering the TIA image.
|
||||||
|
|
|
@ -27,7 +27,7 @@ class Ball : public Serializable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
Ball(uInt32 collisionMask);
|
explicit Ball(uInt32 collisionMask);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ template<unsigned length, unsigned capacity>
|
||||||
class DelayQueueIteratorImpl : public DelayQueueIterator
|
class DelayQueueIteratorImpl : public DelayQueueIterator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DelayQueueIteratorImpl(const DelayQueue<length, capacity>& delayQueue);
|
explicit DelayQueueIteratorImpl(const DelayQueue<length, capacity>& delayQueue);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ class Missile : public Serializable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
Missile(uInt32 collisionMask);
|
explicit Missile(uInt32 collisionMask);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ class TIA;
|
||||||
class Player : public Serializable
|
class Player : public Serializable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Player(uInt32 collisionMask);
|
explicit Player(uInt32 collisionMask);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ class TIA;
|
||||||
class Playfield : public Serializable
|
class Playfield : public Serializable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Playfield(uInt32 collisionMask);
|
explicit Playfield(uInt32 collisionMask);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ class CommandSender
|
||||||
// TODO - allow for multiple targets, i.e. store targets in a list
|
// TODO - allow for multiple targets, i.e. store targets in a list
|
||||||
// and add methods addTarget/removeTarget.
|
// and add methods addTarget/removeTarget.
|
||||||
public:
|
public:
|
||||||
CommandSender(CommandReceiver* target)
|
explicit CommandSender(CommandReceiver* target)
|
||||||
: _target(target) { }
|
: _target(target) { }
|
||||||
|
|
||||||
virtual ~CommandSender() = default;
|
virtual ~CommandSender() = default;
|
||||||
|
|
|
@ -34,7 +34,7 @@ class CommandMenu : public DialogContainer
|
||||||
/**
|
/**
|
||||||
Create a new menu stack
|
Create a new menu stack
|
||||||
*/
|
*/
|
||||||
CommandMenu(OSystem& osystem);
|
explicit CommandMenu(OSystem& osystem);
|
||||||
virtual ~CommandMenu() = default;
|
virtual ~CommandMenu() = default;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -165,7 +165,7 @@ class Dialog : public GuiObject
|
||||||
Widget* widget;
|
Widget* widget;
|
||||||
WidgetArray list;
|
WidgetArray list;
|
||||||
|
|
||||||
Focus(Widget* w = nullptr) : widget(w) { }
|
explicit Focus(Widget* w = nullptr) : widget(w) { }
|
||||||
virtual ~Focus() = default;
|
virtual ~Focus() = default;
|
||||||
|
|
||||||
Focus(const Focus&) = default;
|
Focus(const Focus&) = default;
|
||||||
|
@ -178,7 +178,7 @@ class Dialog : public GuiObject
|
||||||
FocusList focus;
|
FocusList focus;
|
||||||
uInt32 currentTab;
|
uInt32 currentTab;
|
||||||
|
|
||||||
TabFocus(TabWidget* w = nullptr) : widget(w), currentTab(0) { }
|
explicit TabFocus(TabWidget* w = nullptr) : widget(w), currentTab(0) { }
|
||||||
virtual ~TabFocus() = default;
|
virtual ~TabFocus() = default;
|
||||||
|
|
||||||
TabFocus(const TabFocus&) = default;
|
TabFocus(const TabFocus&) = default;
|
||||||
|
|
|
@ -46,7 +46,7 @@ class DialogContainer
|
||||||
/**
|
/**
|
||||||
Create a new DialogContainer stack
|
Create a new DialogContainer stack
|
||||||
*/
|
*/
|
||||||
DialogContainer(OSystem& osystem);
|
explicit DialogContainer(OSystem& osystem);
|
||||||
virtual ~DialogContainer();
|
virtual ~DialogContainer();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -55,7 +55,7 @@ namespace GUI {
|
||||||
class Font
|
class Font
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Font(const FontDesc& desc);
|
explicit Font(const FontDesc& desc);
|
||||||
|
|
||||||
const FontDesc& desc() const { return myFontDesc; }
|
const FontDesc& desc() const { return myFontDesc; }
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ class Launcher : public DialogContainer
|
||||||
/**
|
/**
|
||||||
Create a new menu stack
|
Create a new menu stack
|
||||||
*/
|
*/
|
||||||
Launcher(OSystem& osystem);
|
explicit Launcher(OSystem& osystem);
|
||||||
virtual ~Launcher() = default;
|
virtual ~Launcher() = default;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -33,7 +33,7 @@ class Menu : public DialogContainer
|
||||||
/**
|
/**
|
||||||
Create a new menu stack
|
Create a new menu stack
|
||||||
*/
|
*/
|
||||||
Menu(OSystem& osystem);
|
explicit Menu(OSystem& osystem);
|
||||||
virtual ~Menu() = default;
|
virtual ~Menu() = default;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -38,7 +38,7 @@ struct Point
|
||||||
Point() : x(0), y(0) { }
|
Point() : x(0), y(0) { }
|
||||||
Point(const Point& p) : x(p.x), y(p.y) { }
|
Point(const Point& p) : x(p.x), y(p.y) { }
|
||||||
explicit Point(uInt32 x1, uInt32 y1) : x(x1), y(y1) { }
|
explicit Point(uInt32 x1, uInt32 y1) : x(x1), y(y1) { }
|
||||||
Point(const string& p) : x(0), y(0) {
|
explicit Point(const string& p) : x(0), y(0) {
|
||||||
char c = '\0';
|
char c = '\0';
|
||||||
istringstream buf(p);
|
istringstream buf(p);
|
||||||
buf >> x >> c >> y;
|
buf >> x >> c >> y;
|
||||||
|
@ -63,7 +63,7 @@ struct Size
|
||||||
Size() : w(0), h(0) { }
|
Size() : w(0), h(0) { }
|
||||||
Size(const Size& s) : w(s.w), h(s.h) { }
|
Size(const Size& s) : w(s.w), h(s.h) { }
|
||||||
explicit Size(uInt32 w1, uInt32 h1) : w(w1), h(h1) { }
|
explicit Size(uInt32 w1, uInt32 h1) : w(w1), h(h1) { }
|
||||||
Size(const string& s) : w(0), h(0) {
|
explicit Size(const string& s) : w(0), h(0) {
|
||||||
char c = '\0';
|
char c = '\0';
|
||||||
istringstream buf(s);
|
istringstream buf(s);
|
||||||
buf >> w >> c >> h;
|
buf >> w >> c >> h;
|
||||||
|
|
|
@ -30,7 +30,7 @@ class OSystem;
|
||||||
class TimeMachine : public DialogContainer
|
class TimeMachine : public DialogContainer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TimeMachine(OSystem& osystem);
|
explicit TimeMachine(OSystem& osystem);
|
||||||
virtual ~TimeMachine() = default;
|
virtual ~TimeMachine() = default;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -33,7 +33,7 @@ class SettingsUNIX : public Settings
|
||||||
/**
|
/**
|
||||||
Create a new UNIX settings object
|
Create a new UNIX settings object
|
||||||
*/
|
*/
|
||||||
SettingsUNIX(OSystem& osystem);
|
explicit SettingsUNIX(OSystem& osystem);
|
||||||
virtual ~SettingsUNIX() = default;
|
virtual ~SettingsUNIX() = default;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in New Issue