diff options
author | Adrian Kummerlaender | 2016-12-11 12:36:04 +0100 |
---|---|---|
committer | Adrian Kummerlaender | 2016-12-11 12:37:09 +0100 |
commit | dbbef17103dc21c085c8b5713433fb730a5f8d3a (patch) | |
tree | a5c19ae0d025a7d94a93afdfb662eea33e599ea6 /src/box_indicator.h | |
parent | 93c5f7356364bd6e0276dddd0a78bcb50085629f (diff) | |
download | termlife-dbbef17103dc21c085c8b5713433fb730a5f8d3a.tar termlife-dbbef17103dc21c085c8b5713433fb730a5f8d3a.tar.gz termlife-dbbef17103dc21c085c8b5713433fb730a5f8d3a.tar.bz2 termlife-dbbef17103dc21c085c8b5713433fb730a5f8d3a.tar.lz termlife-dbbef17103dc21c085c8b5713433fb730a5f8d3a.tar.xz termlife-dbbef17103dc21c085c8b5713433fb730a5f8d3a.tar.zst termlife-dbbef17103dc21c085c8b5713433fb730a5f8d3a.zip |
Move `util` namespace classes into matching folder
Diffstat (limited to 'src/box_indicator.h')
-rw-r--r-- | src/box_indicator.h | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/src/box_indicator.h b/src/box_indicator.h deleted file mode 100644 index db750e4..0000000 --- a/src/box_indicator.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef LIFE_SRC_BOX_INDICATOR_ -#define LIFE_SRC_BOX_INDICATOR_ - -namespace life { -namespace util { - -class BoxIndicator { - public: - 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_; - } - - protected: - const std::size_t a_x_; - const std::size_t a_y_; - const std::size_t b_x_; - const std::size_t b_y_; - -}; - -} -} - -#endif // LIFE_SRC_BOX_INDICATOR_ |