diff options
author | HampusM <hampus@hampusmat.com> | 2022-03-14 18:02:18 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-13 17:56:56 +0200 |
commit | dc6222611ad14a33f642396558ba84ecba9d6605 (patch) | |
tree | d759020233b66be62c5539209a03842d283b67a9 /src/engine/data/bounds.hpp | |
parent | dbab54ebf134b6ab2cf719d7c26a191fbffeed34 (diff) |
perf: add noexcept almost everywhere
Diffstat (limited to 'src/engine/data/bounds.hpp')
-rw-r--r-- | src/engine/data/bounds.hpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/engine/data/bounds.hpp b/src/engine/data/bounds.hpp index 9b72f59..4a29158 100644 --- a/src/engine/data/bounds.hpp +++ b/src/engine/data/bounds.hpp @@ -22,15 +22,17 @@ struct BoundsOptions class Bounds { public: - explicit Bounds(const BoundsOptions &options); + using Value = uint32_t; - [[nodiscard]] uint32_t get_width() const noexcept; + explicit Bounds(const BoundsOptions &options) noexcept; - void set_width(uint32_t width) noexcept; + [[nodiscard]] Value get_width() const noexcept; - [[nodiscard]] uint32_t get_height() const noexcept; + void set_width(Value width) noexcept; - void set_height(uint32_t height) noexcept; + [[nodiscard]] Value get_height() const noexcept; + + void set_height(Value height) noexcept; [[nodiscard]] CoordsValidation validate_coords(const Vector2 &coords) const noexcept; @@ -39,6 +41,6 @@ public: const Bounds &operator-=(const Bounds &bounds) noexcept; private: - uint32_t _width = 0U; - uint32_t _height = 0U; + Value _width = 0U; + Value _height = 0U; }; |