make destructors virtual

This commit is contained in:
Carl Schwope 2013-11-14 15:53:51 -05:00
parent 150830b270
commit 1c1f37b76e
8 changed files with 11 additions and 6 deletions

View File

@ -28,6 +28,10 @@ namespace SDL2pp {
Exception::Exception(const char* what) : what_(what), sdl_error_(SDL_GetError()) {
}
Exception::~Exception() noexcept {
// nothing to do
}
const char* Exception::what() const noexcept {
return what_;
}

View File

@ -33,6 +33,7 @@ private:
public:
Exception(const char* what = "");
virtual ~Exception() noexcept;
const char* what() const noexcept;
const char* GetSDLError() const noexcept;
};

View File

@ -45,7 +45,7 @@ private:
public:
Point(int x, int y);
~Point();
virtual ~Point();
static Point Null();

View File

@ -37,7 +37,7 @@ private:
public:
Rect(int x, int y, int w, int h);
~Rect();
virtual ~Rect();
static Rect Null();

View File

@ -39,7 +39,7 @@ private:
public:
Renderer(Window& window, int index, Uint32 flags);
~Renderer();
virtual ~Renderer();
Renderer(const Renderer& other) = delete;
Renderer(Renderer&& other) = delete;

View File

@ -29,7 +29,7 @@ namespace SDL2pp {
class SDL {
public:
SDL(Uint32 flags);
~SDL();
virtual ~SDL();
SDL(const SDL& other) = delete;
SDL(SDL&& other) = delete;

View File

@ -38,7 +38,7 @@ private:
public:
Texture(Renderer& renderer, Uint32 format, int access, int w, int h);
~Texture();
virtual ~Texture();
Texture(const Texture& other) = delete;
Texture(Texture&& other) = delete;

View File

@ -34,7 +34,7 @@ private:
public:
Window(const char* title, int x, int y, int w, int h, Uint32 flags);
~Window();
virtual ~Window();
Window(const Window& other) = delete;
Window(Window&& other) = delete;