From 855e97b88036f83fe951be8399e9daf49a4c6e70 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 29 Dec 2016 05:38:48 +0300 Subject: Add constexpr into ClipRect class. Remove cliprect.cpp --- src/gui/cliprect.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/gui/cliprect.h') 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) -- cgit v1.2.3-60-g2f50