aboutsummaryrefslogtreecommitdiff
path: root/src/engine/data/vector2.cpp
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-03-14 18:02:18 +0100
committerHampusM <hampus@hampusmat.com>2022-06-13 17:56:56 +0200
commitdc6222611ad14a33f642396558ba84ecba9d6605 (patch)
treed759020233b66be62c5539209a03842d283b67a9 /src/engine/data/vector2.cpp
parentdbab54ebf134b6ab2cf719d7c26a191fbffeed34 (diff)
perf: add noexcept almost everywhere
Diffstat (limited to 'src/engine/data/vector2.cpp')
-rw-r--r--src/engine/data/vector2.cpp22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/engine/data/vector2.cpp b/src/engine/data/vector2.cpp
index 04cc42e..dba745f 100644
--- a/src/engine/data/vector2.cpp
+++ b/src/engine/data/vector2.cpp
@@ -2,8 +2,6 @@
#include "util/hash.hpp"
-Vector2::Vector2(const Vector2Options &options) : _x(options.x), _y(options.y) {}
-
Vector2::Value Vector2::get_x() const noexcept
{
return _x;
@@ -71,26 +69,6 @@ bool Vector2::operator==(const Vector2 &vector2) const noexcept
return _x == vector2._x && _y == vector2._y;
}
-Vector2 Vector2::up() noexcept
-{
- return Vector2({.x = 0, .y = -1});
-}
-
-Vector2 Vector2::down() noexcept
-{
- return Vector2({.x = 0, .y = 1});
-}
-
-Vector2 Vector2::left() noexcept
-{
- return Vector2({.x = -1, .y = 0});
-}
-
-Vector2 Vector2::right() noexcept
-{
- return Vector2({.x = 1, .y = 0});
-}
-
std::size_t Vector2Hasher::operator()(const Vector2 &vector2) const noexcept
{
std::size_t result_hash = 0;