From 6622e436442e37190c43aa40770f0f01bc2427e9 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sun, 11 Dec 2016 13:39:33 +0100 Subject: Move non-template classes into distinct compilation units --- src/util/box_indicator.h | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'src/util/box_indicator.h') diff --git a/src/util/box_indicator.h b/src/util/box_indicator.h index c0493c7..b93264b 100644 --- a/src/util/box_indicator.h +++ b/src/util/box_indicator.h @@ -1,30 +1,22 @@ #ifndef LIFE_SRC_UTIL_BOX_INDICATOR_ #define LIFE_SRC_UTIL_BOX_INDICATOR_ +#include + namespace life { namespace util { class BoxIndicator { public: - BoxIndicator( + BoxIndicator( const std::size_t offset_x, const std::size_t offset_y, const std::size_t size_x, - const std::size_t size_y): - a_x_{offset_x}, - a_y_{offset_y}, - b_x_{a_x_ + size_x}, - b_y_{a_y_ + size_y} { } - - BoxIndicator(const std::size_t size_x, const std::size_t size_y): - BoxIndicator(0, 0, size_x, size_y) { } - - bool operator()(const std::size_t x, const std::size_t y) const { - return x >= this->a_x_ - && x < this->b_x_ - && y >= this->a_y_ - && y < this->b_y_; - } + const std::size_t size_y); + + BoxIndicator(const std::size_t size_x, const std::size_t size_y); + + bool operator()(const std::size_t x, const std::size_t y) const; protected: const std::size_t a_x_; -- cgit v1.2.3