aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-06-22 19:32:42 +0200
committerHampusM <hampus@hampusmat.com>2022-06-22 19:32:42 +0200
commit94954fff4ef6105926cdbfda73091e8651d93f56 (patch)
treea75c8c02031adb4d59c900c213fbd9e7e359085f
parent2a0bb102db0a2b29fc2140aa73af2f5d48b50de5 (diff)
fix: prevent bounds validation not checking low
-rw-r--r--src/engine/data/bounds.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/engine/data/bounds.cpp b/src/engine/data/bounds.cpp
index 0cbe9c3..21c6660 100644
--- a/src/engine/data/bounds.cpp
+++ b/src/engine/data/bounds.cpp
@@ -32,7 +32,7 @@ auto Bounds::validate_coords(const Vector2 &coords) const noexcept -> CoordsVali
return CoordsValidation::X_HIGH;
}
- if (static_cast<Bounds::Value>(coords.get_x()) < 0)
+ if (coords.get_x() < 0)
{
return CoordsValidation::X_LOW;
}
@@ -42,7 +42,7 @@ auto Bounds::validate_coords(const Vector2 &coords) const noexcept -> CoordsVali
return CoordsValidation::Y_HIGH;
}
- if (static_cast<Bounds::Value>(coords.get_y()) < 0)
+ if (coords.get_y() < 0)
{
return CoordsValidation::Y_LOW;
}