summaryrefslogtreecommitdiffstats
path: root/core/math
diff options
context:
space:
mode:
authorA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2024-01-19 13:21:39 +0100
committerA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2024-02-09 12:50:15 +0100
commit684752e75bdeb58727c2d9b0ff0265d7fcd47de0 (patch)
tree4fc57e9d0738021b8b31699a6339275347e38ec0 /core/math
parent94dbf69f5d6b7d2fd9561692df2e71557607fddc (diff)
downloadredot-engine-684752e75bdeb58727c2d9b0ff0265d7fcd47de0.tar.gz
Replace error checks against `size` with `is_empty`
Diffstat (limited to 'core/math')
-rw-r--r--core/math/geometry_2d.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/math/geometry_2d.cpp b/core/math/geometry_2d.cpp
index 74cb92539a..1e5f12bebf 100644
--- a/core/math/geometry_2d.cpp
+++ b/core/math/geometry_2d.cpp
@@ -93,7 +93,7 @@ void Geometry2D::make_atlas(const Vector<Size2i> &p_rects, Vector<Point2i> &r_re
// For example, it will prioritize a 1024x1024 atlas (works everywhere) instead of a
// 256x8192 atlas (won't work anywhere).
- ERR_FAIL_COND(p_rects.size() == 0);
+ ERR_FAIL_COND(p_rects.is_empty());
for (int i = 0; i < p_rects.size(); i++) {
ERR_FAIL_COND(p_rects[i].width <= 0);
ERR_FAIL_COND(p_rects[i].height <= 0);