mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-08-03 10:55:57 -04:00
make destructors virtual
This commit is contained in:
parent
150830b270
commit
1c1f37b76e
@ -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_;
|
||||
}
|
||||
|
@ -33,6 +33,7 @@ private:
|
||||
|
||||
public:
|
||||
Exception(const char* what = "");
|
||||
virtual ~Exception() noexcept;
|
||||
const char* what() const noexcept;
|
||||
const char* GetSDLError() const noexcept;
|
||||
};
|
||||
|
@ -45,7 +45,7 @@ private:
|
||||
|
||||
public:
|
||||
Point(int x, int y);
|
||||
~Point();
|
||||
virtual ~Point();
|
||||
|
||||
static Point Null();
|
||||
|
||||
|
@ -37,7 +37,7 @@ private:
|
||||
|
||||
public:
|
||||
Rect(int x, int y, int w, int h);
|
||||
~Rect();
|
||||
virtual ~Rect();
|
||||
|
||||
static Rect Null();
|
||||
|
||||
|
@ -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;
|
||||
|
@ -29,7 +29,7 @@ namespace SDL2pp {
|
||||
class SDL {
|
||||
public:
|
||||
SDL(Uint32 flags);
|
||||
~SDL();
|
||||
virtual ~SDL();
|
||||
|
||||
SDL(const SDL& other) = delete;
|
||||
SDL(SDL&& other) = delete;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user