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:
CheatCodeDialog(OSystem* osystem, DialogContainer* parent,
const GUI::Font& font);
~CheatCodeDialog();
virtual ~CheatCodeDialog();
protected:
virtual void handleCommand(CommandSender* sender, int cmd, int data, int id);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -69,7 +69,7 @@ Serializer::Serializer(const string& filename, bool readonly)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Serializer::Serializer(void)
Serializer::Serializer()
: myStream(NULL),
myUseFilestream(false)
{
@ -86,7 +86,7 @@ Serializer::Serializer(void)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Serializer::~Serializer(void)
Serializer::~Serializer()
{
if(myStream != NULL)
{
@ -99,13 +99,13 @@ Serializer::~Serializer(void)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool Serializer::isValid(void)
bool Serializer::isValid()
{
return myStream != NULL;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Serializer::reset(void)
void Serializer::reset()
{
myStream->clear();
myStream->seekg(ios_base::beg);
@ -113,7 +113,7 @@ void Serializer::reset(void)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
uInt8 Serializer::getByte(void)
uInt8 Serializer::getByte()
{
char buf;
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;
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;
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();
string str;
@ -169,7 +169,7 @@ string Serializer::getString(void)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool Serializer::getBool(void)
bool Serializer::getBool()
{
return getByte() == TruePattern;
}

View File

@ -54,31 +54,31 @@ class Serializer
was correctly initialized.
*/
Serializer(const string& filename, bool readonly = false);
Serializer(void);
Serializer();
/**
Destructor
*/
virtual ~Serializer(void);
~Serializer();
public:
/**
Answers whether the serializer is currently initialized for reading
and writing.
*/
bool isValid(void);
bool isValid();
/**
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.
@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.
@ -94,7 +94,7 @@ class Serializer
@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.
@ -109,7 +109,7 @@ class Serializer
@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.
@ -124,14 +124,14 @@ class Serializer
@result The string which has been read from the stream.
*/
string getString(void);
string getString();
/**
Reads a boolean value from the current input 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.

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -48,11 +48,6 @@ class TIASurface
*/
TIASurface(OSystem& system);
/**
Destructor
*/
virtual ~TIASurface();
/**
Set the TIA object, which is needed for actually rendering the TIA image.
*/