mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-08-05 11:56:00 -04:00
Remove deprecated functions
This commit is contained in:
parent
feabe1497e
commit
feaec6838b
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
libSDL2pp - C++11 bindings/wrapper for SDL2
|
libSDL2pp - C++11 bindings/wrapper for SDL2
|
||||||
Copyright (C) 2013-2014 Dmitry Marakasov <amdmi3@amdmi3.ru>
|
Copyright (C) 2013-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
@ -38,10 +38,6 @@ Point::Point(int nx, int ny) {
|
|||||||
y = ny;
|
y = ny;
|
||||||
}
|
}
|
||||||
|
|
||||||
Optional<Point> Point::Null() {
|
|
||||||
return NullOpt;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Point::operator==(const Point& other) const {
|
bool Point::operator==(const Point& other) const {
|
||||||
return x == other.x && y == other.y;
|
return x == other.x && y == other.y;
|
||||||
}
|
}
|
||||||
@ -50,18 +46,6 @@ bool Point::operator!=(const Point& other) const {
|
|||||||
return !(*this == other);
|
return !(*this == other);
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_Point* Point::Get() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
const SDL_Point* Point::Get() const {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Point::IsNull() const {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
int Point::GetX() const {
|
int Point::GetX() const {
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
@ -24,9 +24,6 @@
|
|||||||
|
|
||||||
#include <SDL2/SDL_rect.h>
|
#include <SDL2/SDL_rect.h>
|
||||||
|
|
||||||
#include <SDL2pp/Config.hh>
|
|
||||||
#include <SDL2pp/Optional.hh> // for deprecated functionality
|
|
||||||
|
|
||||||
namespace SDL2pp {
|
namespace SDL2pp {
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
@ -71,8 +68,6 @@ public:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
Point(int nx, int ny);
|
Point(int nx, int ny);
|
||||||
|
|
||||||
SDL2PP_DEPRECATED static Optional<Point> Null();
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Copy constructor
|
/// \brief Copy constructor
|
||||||
///
|
///
|
||||||
@ -121,11 +116,6 @@ public:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
bool operator!=(const Point& other) const;
|
bool operator!=(const Point& other) const;
|
||||||
|
|
||||||
SDL2PP_DEPRECATED SDL_Point* Get();
|
|
||||||
SDL2PP_DEPRECATED const SDL_Point* Get() const;
|
|
||||||
|
|
||||||
SDL2PP_DEPRECATED bool IsNull() const;
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Get X coordinate of the point
|
/// \brief Get X coordinate of the point
|
||||||
///
|
///
|
||||||
|
@ -55,10 +55,6 @@ Rect::Rect(int nx, int ny, int nw, int nh) {
|
|||||||
h = nh;
|
h = nh;
|
||||||
}
|
}
|
||||||
|
|
||||||
Optional<Rect> Rect::Null() {
|
|
||||||
return NullOpt;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Rect::operator==(const Rect& other) const {
|
bool Rect::operator==(const Rect& other) const {
|
||||||
return x == other.x && y == other.y &&
|
return x == other.x && y == other.y &&
|
||||||
w == other.w && h == other.h;
|
w == other.w && h == other.h;
|
||||||
@ -68,14 +64,6 @@ bool Rect::operator!=(const Rect& other) const {
|
|||||||
return !(*this == other);
|
return !(*this == other);
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_Rect* Rect::Get() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
const SDL_Rect* Rect::Get() const {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
Rect Rect::FromCenter(int cx, int cy, int w, int h) {
|
Rect Rect::FromCenter(int cx, int cy, int w, int h) {
|
||||||
return Rect(cx - w/2, cy - h/2, w, h);
|
return Rect(cx - w/2, cy - h/2, w, h);
|
||||||
}
|
}
|
||||||
@ -92,10 +80,6 @@ Rect Rect::FromCorners(const Point& p1, const Point& p2) {
|
|||||||
return Rect(p1, p2 - p1 + Point(1, 1));
|
return Rect(p1, p2 - p1 + Point(1, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Rect::IsNull() const {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
int Rect::GetX() const {
|
int Rect::GetX() const {
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
@ -24,8 +24,7 @@
|
|||||||
|
|
||||||
#include <SDL2/SDL_rect.h>
|
#include <SDL2/SDL_rect.h>
|
||||||
|
|
||||||
#include <SDL2pp/Config.hh>
|
#include <SDL2pp/Optional.hh>
|
||||||
#include <SDL2pp/Optional.hh> // for deprecated functionality
|
|
||||||
|
|
||||||
struct SDL_Rect;
|
struct SDL_Rect;
|
||||||
|
|
||||||
@ -86,8 +85,6 @@ public:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
Rect(int x, int y, int w, int h);
|
Rect(int x, int y, int w, int h);
|
||||||
|
|
||||||
SDL2PP_DEPRECATED static Optional<Rect> Null();
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Construct the rect from given center coordinates, width and height
|
/// \brief Construct the rect from given center coordinates, width and height
|
||||||
///
|
///
|
||||||
@ -176,11 +173,6 @@ public:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
bool operator!=(const Rect& other) const;
|
bool operator!=(const Rect& other) const;
|
||||||
|
|
||||||
SDL2PP_DEPRECATED SDL_Rect* Get();
|
|
||||||
SDL2PP_DEPRECATED const SDL_Rect* Get() const;
|
|
||||||
|
|
||||||
SDL2PP_DEPRECATED bool IsNull() const;
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Get X coordinate of the rect corner
|
/// \brief Get X coordinate of the rect corner
|
||||||
///
|
///
|
||||||
|
Loading…
x
Reference in New Issue
Block a user