Minor cleanup of d'tor in various classes, removing d'tors with no

implementation, and using virtual d'tor only when absolutely necessary.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3000 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2014-09-29 20:39:28 +00:00
parent 33047a286b
commit ab2e086fe0
20 changed files with 24 additions and 81 deletions

View File

@ -38,7 +38,7 @@ class CheatCodeDialog : public Dialog
public: public:
CheatCodeDialog(OSystem* osystem, DialogContainer* parent, CheatCodeDialog(OSystem* osystem, DialogContainer* parent,
const GUI::Font& font); const GUI::Font& font);
~CheatCodeDialog(); virtual ~CheatCodeDialog();
protected: protected:
virtual void handleCommand(CommandSender* sender, int cmd, int data, int id); virtual void handleCommand(CommandSender* sender, int cmd, int data, int id);

View File

@ -43,7 +43,7 @@ class CheatManager
{ {
public: public:
CheatManager(OSystem* osystem); CheatManager(OSystem* osystem);
virtual ~CheatManager(); ~CheatManager();
/** /**
Adds the specified cheat to an internal list. Adds the specified cheat to an internal list.

View File

@ -167,11 +167,6 @@ MouseControl::MouseControl(Console& console, const string& mode)
#endif #endif
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MouseControl::~MouseControl()
{
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const string& MouseControl::next() const string& MouseControl::next()
{ {

View File

@ -60,12 +60,6 @@ class MouseControl
*/ */
MouseControl(Console& console, const string& mode); MouseControl(Console& console, const string& mode);
/**
Destructor
*/
virtual ~MouseControl();
public:
/** /**
Cycle through each available mouse control mode Cycle through each available mouse control mode

View File

@ -41,7 +41,7 @@ class PNGLibrary
{ {
public: public:
PNGLibrary(const FrameBuffer& fb); PNGLibrary(const FrameBuffer& fb);
virtual ~PNGLibrary(); ~PNGLibrary();
/** /**
Read a PNG image from the specified file into a FBSurface structure, Read a PNG image from the specified file into a FBSurface structure,

View File

@ -69,7 +69,7 @@ class ZipHandler
{ {
public: public:
ZipHandler(); ZipHandler();
virtual ~ZipHandler(); ~ZipHandler();
// Open ZIP file for processing // Open ZIP file for processing
void open(const string& filename); void open(const string& filename);

View File

@ -30,11 +30,6 @@ NTSCFilter::NTSCFilter()
{ {
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NTSCFilter::~NTSCFilter()
{
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void NTSCFilter::setTIAPalette(const TIASurface& tiaSurface, const uInt32* palette) void NTSCFilter::setTIAPalette(const TIASurface& tiaSurface, const uInt32* palette)
{ {

View File

@ -42,7 +42,6 @@ class NTSCFilter
{ {
public: public:
NTSCFilter(); NTSCFilter();
virtual ~NTSCFilter();
public: public:
// Set one of the available preset adjustments (Composite, S-Video, RGB, etc) // Set one of the available preset adjustments (Composite, S-Video, RGB, etc)

View File

@ -47,7 +47,7 @@ class MT24LC256
/** /**
Destructor Destructor
*/ */
virtual ~MT24LC256(); ~MT24LC256();
public: public:
/** Read boolean data from the SDA line */ /** Read boolean data from the SDA line */

View File

@ -36,11 +36,6 @@ Properties::Properties(const Properties& properties)
copy(properties); copy(properties);
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Properties::~Properties()
{
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const string& Properties::get(PropertyType key) const const string& Properties::get(PropertyType key) const
{ {

View File

@ -76,11 +76,6 @@ class Properties
*/ */
Properties(const Properties& properties); Properties(const Properties& properties);
/**
Destructor
*/
virtual ~Properties();
public: public:
/** /**
Get the value assigned to the specified key. If the key does Get the value assigned to the specified key. If the key does

View File

@ -50,7 +50,7 @@ class PropertiesSet
/** /**
Destructor Destructor
*/ */
virtual ~PropertiesSet(); ~PropertiesSet();
public: public:
/** /**

View File

@ -69,7 +69,7 @@ Serializer::Serializer(const string& filename, bool readonly)
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Serializer::Serializer(void) Serializer::Serializer()
: myStream(NULL), : myStream(NULL),
myUseFilestream(false) myUseFilestream(false)
{ {
@ -86,7 +86,7 @@ Serializer::Serializer(void)
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Serializer::~Serializer(void) Serializer::~Serializer()
{ {
if(myStream != NULL) if(myStream != NULL)
{ {
@ -99,13 +99,13 @@ Serializer::~Serializer(void)
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool Serializer::isValid(void) bool Serializer::isValid()
{ {
return myStream != NULL; return myStream != NULL;
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Serializer::reset(void) void Serializer::reset()
{ {
myStream->clear(); myStream->clear();
myStream->seekg(ios_base::beg); myStream->seekg(ios_base::beg);
@ -113,7 +113,7 @@ void Serializer::reset(void)
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
uInt8 Serializer::getByte(void) uInt8 Serializer::getByte()
{ {
char buf; char buf;
myStream->read(&buf, 1); myStream->read(&buf, 1);
@ -128,7 +128,7 @@ void Serializer::getByteArray(uInt8* array, uInt32 size)
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
uInt16 Serializer::getShort(void) uInt16 Serializer::getShort()
{ {
uInt16 val = 0; uInt16 val = 0;
myStream->read((char*)&val, sizeof(uInt16)); myStream->read((char*)&val, sizeof(uInt16));
@ -143,7 +143,7 @@ void Serializer::getShortArray(uInt16* array, uInt32 size)
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
uInt32 Serializer::getInt(void) uInt32 Serializer::getInt()
{ {
uInt32 val = 0; uInt32 val = 0;
myStream->read((char*)&val, sizeof(uInt32)); myStream->read((char*)&val, sizeof(uInt32));
@ -158,7 +158,7 @@ void Serializer::getIntArray(uInt32* array, uInt32 size)
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
string Serializer::getString(void) string Serializer::getString()
{ {
int len = getInt(); int len = getInt();
string str; string str;
@ -169,7 +169,7 @@ string Serializer::getString(void)
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool Serializer::getBool(void) bool Serializer::getBool()
{ {
return getByte() == TruePattern; return getByte() == TruePattern;
} }

View File

@ -54,31 +54,31 @@ class Serializer
was correctly initialized. was correctly initialized.
*/ */
Serializer(const string& filename, bool readonly = false); Serializer(const string& filename, bool readonly = false);
Serializer(void); Serializer();
/** /**
Destructor Destructor
*/ */
virtual ~Serializer(void); ~Serializer();
public: public:
/** /**
Answers whether the serializer is currently initialized for reading Answers whether the serializer is currently initialized for reading
and writing. and writing.
*/ */
bool isValid(void); bool isValid();
/** /**
Resets the read/write location to the beginning of the stream. Resets the read/write location to the beginning of the stream.
*/ */
void reset(void); void reset();
/** /**
Reads a byte value (unsigned 8-bit) from the current input stream. Reads a byte value (unsigned 8-bit) from the current input stream.
@result The byte value which has been read from the stream. @result The byte value which has been read from the stream.
*/ */
uInt8 getByte(void); uInt8 getByte();
/** /**
Reads a byte array (unsigned 8-bit) from the current input stream. Reads a byte array (unsigned 8-bit) from the current input stream.
@ -94,7 +94,7 @@ class Serializer
@result The short value which has been read from the stream. @result The short value which has been read from the stream.
*/ */
uInt16 getShort(void); uInt16 getShort();
/** /**
Reads a short array (unsigned 16-bit) from the current input stream. Reads a short array (unsigned 16-bit) from the current input stream.
@ -109,7 +109,7 @@ class Serializer
@result The int value which has been read from the stream. @result The int value which has been read from the stream.
*/ */
uInt32 getInt(void); uInt32 getInt();
/** /**
Reads an integer array (unsigned 32-bit) from the current input stream. Reads an integer array (unsigned 32-bit) from the current input stream.
@ -124,14 +124,14 @@ class Serializer
@result The string which has been read from the stream. @result The string which has been read from the stream.
*/ */
string getString(void); string getString();
/** /**
Reads a boolean value from the current input stream. Reads a boolean value from the current input stream.
@result The boolean value which has been read from the stream. @result The boolean value which has been read from the stream.
*/ */
bool getBool(void); bool getBool();
/** /**
Writes an byte value (unsigned 8-bit) to the current output stream. Writes an byte value (unsigned 8-bit) to the current output stream.

View File

@ -42,11 +42,6 @@ StateManager::StateManager(OSystem* osystem)
reset(); reset();
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
StateManager::~StateManager()
{
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool StateManager::isActive() bool StateManager::isActive()
{ {

View File

@ -40,11 +40,6 @@ class StateManager
*/ */
StateManager(OSystem* osystem); StateManager(OSystem* osystem);
/**
Destructor
*/
virtual ~StateManager();
public: public:
/** /**
Answers whether the manager is in record or playback mode Answers whether the manager is in record or playback mode

View File

@ -30,11 +30,6 @@ TIASound::TIASound(Int32 outputFrequency)
reset(); reset();
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TIASound::~TIASound()
{
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void TIASound::reset() void TIASound::reset()
{ {

View File

@ -40,11 +40,6 @@ class TIASound
*/ */
TIASound(Int32 outputFrequency = 31400); TIASound(Int32 outputFrequency = 31400);
/**
Destructor
*/
virtual ~TIASound();
public: public:
/** /**
Reset the sound emulation to its power-on state Reset the sound emulation to its power-on state

View File

@ -62,11 +62,6 @@ TIASurface::TIASurface(OSystem& system)
myBaseTiaSurface = myFB.surface(baseID); myBaseTiaSurface = myFB.surface(baseID);
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TIASurface::~TIASurface()
{
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void TIASurface::initialize(const Console& console, const VideoMode& mode) void TIASurface::initialize(const Console& console, const VideoMode& mode)
{ {

View File

@ -48,11 +48,6 @@ class TIASurface
*/ */
TIASurface(OSystem& system); TIASurface(OSystem& system);
/**
Destructor
*/
virtual ~TIASurface();
/** /**
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.
*/ */