mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-09-09 15:28:29 -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(const char* what) : what_(what), sdl_error_(SDL_GetError()) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Exception::~Exception() noexcept {
|
||||||
|
// nothing to do
|
||||||
|
}
|
||||||
|
|
||||||
const char* Exception::what() const noexcept {
|
const char* Exception::what() const noexcept {
|
||||||
return what_;
|
return what_;
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,7 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
Exception(const char* what = "");
|
Exception(const char* what = "");
|
||||||
|
virtual ~Exception() noexcept;
|
||||||
const char* what() const noexcept;
|
const char* what() const noexcept;
|
||||||
const char* GetSDLError() const noexcept;
|
const char* GetSDLError() const noexcept;
|
||||||
};
|
};
|
||||||
|
@ -45,7 +45,7 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
Point(int x, int y);
|
Point(int x, int y);
|
||||||
~Point();
|
virtual ~Point();
|
||||||
|
|
||||||
static Point Null();
|
static Point Null();
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
Rect(int x, int y, int w, int h);
|
Rect(int x, int y, int w, int h);
|
||||||
~Rect();
|
virtual ~Rect();
|
||||||
|
|
||||||
static Rect Null();
|
static Rect Null();
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
Renderer(Window& window, int index, Uint32 flags);
|
Renderer(Window& window, int index, Uint32 flags);
|
||||||
~Renderer();
|
virtual ~Renderer();
|
||||||
|
|
||||||
Renderer(const Renderer& other) = delete;
|
Renderer(const Renderer& other) = delete;
|
||||||
Renderer(Renderer&& other) = delete;
|
Renderer(Renderer&& other) = delete;
|
||||||
|
@ -29,7 +29,7 @@ namespace SDL2pp {
|
|||||||
class SDL {
|
class SDL {
|
||||||
public:
|
public:
|
||||||
SDL(Uint32 flags);
|
SDL(Uint32 flags);
|
||||||
~SDL();
|
virtual ~SDL();
|
||||||
|
|
||||||
SDL(const SDL& other) = delete;
|
SDL(const SDL& other) = delete;
|
||||||
SDL(SDL&& other) = delete;
|
SDL(SDL&& other) = delete;
|
||||||
|
@ -38,7 +38,7 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
Texture(Renderer& renderer, Uint32 format, int access, int w, int h);
|
Texture(Renderer& renderer, Uint32 format, int access, int w, int h);
|
||||||
~Texture();
|
virtual ~Texture();
|
||||||
|
|
||||||
Texture(const Texture& other) = delete;
|
Texture(const Texture& other) = delete;
|
||||||
Texture(Texture&& other) = delete;
|
Texture(Texture&& other) = delete;
|
||||||
|
@ -34,7 +34,7 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
Window(const char* title, int x, int y, int w, int h, Uint32 flags);
|
Window(const char* title, int x, int y, int w, int h, Uint32 flags);
|
||||||
~Window();
|
virtual ~Window();
|
||||||
|
|
||||||
Window(const Window& other) = delete;
|
Window(const Window& other) = delete;
|
||||||
Window(Window&& other) = delete;
|
Window(Window&& other) = delete;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user