Enabled C++11 "= default" for destructors in the src/cheat and src/common

classes.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3241 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2015-12-29 21:41:53 +00:00
parent 2aec7bc1b1
commit ac98c97bb5
8 changed files with 9 additions and 14 deletions

View File

@ -26,7 +26,7 @@ class BankRomCheat : public Cheat
{ {
public: public:
BankRomCheat(OSystem& os, const string& name, const string& code); BankRomCheat(OSystem& os, const string& name, const string& code);
virtual ~BankRomCheat() { } virtual ~BankRomCheat() = default;
bool enable() override; bool enable() override;
bool disable() override; bool disable() override;

View File

@ -33,7 +33,7 @@ class Cheat
myCode(code), myCode(code),
myEnabled(false) myEnabled(false)
{ } { }
virtual ~Cheat() { } virtual ~Cheat() = default;
bool enabled() const { return myEnabled; } bool enabled() const { return myEnabled; }
const string& name() const { return myName; } const string& name() const { return myName; }

View File

@ -26,7 +26,7 @@ class CheetahCheat : public Cheat
{ {
public: public:
CheetahCheat(OSystem& os, const string& name, const string& code); CheetahCheat(OSystem& os, const string& name, const string& code);
virtual ~CheetahCheat() { } virtual ~CheetahCheat() = default;
bool enable() override; bool enable() override;
bool disable() override; bool disable() override;

View File

@ -26,7 +26,7 @@ class RamCheat : public Cheat
{ {
public: public:
RamCheat(OSystem& os, const string& name, const string& code); RamCheat(OSystem& os, const string& name, const string& code);
virtual ~RamCheat() { } virtual ~RamCheat() = default;
bool enable() override; bool enable() override;
bool disable() override; bool disable() override;

View File

@ -26,11 +26,6 @@ EventHandlerSDL2::EventHandlerSDL2(OSystem& osystem)
{ {
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
EventHandlerSDL2::~EventHandlerSDL2()
{
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void EventHandlerSDL2::enableTextEvents(bool enable) void EventHandlerSDL2::enableTextEvents(bool enable)
{ {

View File

@ -42,7 +42,7 @@ class EventHandlerSDL2 : public EventHandler
/** /**
Destructor Destructor
*/ */
virtual ~EventHandlerSDL2(); virtual ~EventHandlerSDL2() = default;
private: private:
/** /**

View File

@ -48,7 +48,7 @@ class SoundNull : public Sound
/** /**
Destructor Destructor
*/ */
virtual ~SoundNull() { } virtual ~SoundNull() = default;
public: public:
/** /**

View File

@ -24,19 +24,19 @@
namespace Vec { namespace Vec {
template <class T> template<class T>
void append(vector<T>& dst, const vector<T>& src) void append(vector<T>& dst, const vector<T>& src)
{ {
dst.insert(dst.end(), src.begin(), src.end()); dst.insert(dst.end(), src.begin(), src.end());
} }
template <class T> template<class T>
void insertAt(vector<T>& dst, uInt32 idx, const T& element) void insertAt(vector<T>& dst, uInt32 idx, const T& element)
{ {
dst.insert(dst.begin()+idx, element); dst.insert(dst.begin()+idx, element);
} }
template <class T> template<class T>
void removeAt(vector<T>& dst, uInt32 idx) void removeAt(vector<T>& dst, uInt32 idx)
{ {
dst.erase(dst.begin()+idx); dst.erase(dst.begin()+idx);