summaryrefslogtreecommitdiff
path: root/src/gui/cliprect.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-12-29 05:38:48 +0300
committerAndrei Karas <akaras@inbox.ru>2016-12-29 05:38:48 +0300
commit855e97b88036f83fe951be8399e9daf49a4c6e70 (patch)
tree9a904c6aa983ce09b3710122ce1dce346b3264b6 /src/gui/cliprect.h
parent183ecf51d2cb67303ebc24d9bdd0b7f0d094fcf2 (diff)
downloadmanaplus-855e97b88036f83fe951be8399e9daf49a4c6e70.tar.gz
manaplus-855e97b88036f83fe951be8399e9daf49a4c6e70.tar.bz2
manaplus-855e97b88036f83fe951be8399e9daf49a4c6e70.tar.xz
manaplus-855e97b88036f83fe951be8399e9daf49a4c6e70.zip
Add constexpr into ClipRect class. Remove cliprect.cpp
Diffstat (limited to 'src/gui/cliprect.h')
-rw-r--r--src/gui/cliprect.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/gui/cliprect.h b/src/gui/cliprect.h
index 6642dec22..f4e4b3c10 100644
--- a/src/gui/cliprect.h
+++ b/src/gui/cliprect.h
@@ -80,7 +80,12 @@ class ClipRect final : public Rect
/**
* Constructor.
*/
- ClipRect();
+ constexpr ClipRect() :
+ Rect(0, 0, 0, 0),
+ xOffset(0),
+ yOffset(0)
+ {
+ }
/**
* Constructor.
@@ -96,12 +101,17 @@ class ClipRect final : public Rect
* calculating the actual screen coordinate from
* the relative screen coordinate.
*/
- ClipRect(const int x0,
+ constexpr ClipRect(const int x0,
const int y0,
const int width0,
const int height0,
const int xOffset0,
- const int yOffset0);
+ const int yOffset0) :
+ Rect(x0, y0, width0, height0),
+ xOffset(xOffset0),
+ yOffset(yOffset0)
+ {
+ }
A_DELETE_COPY(ClipRect)