summaryrefslogtreecommitdiffstats
path: root/scene/resources/importer_mesh.cpp
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 /scene/resources/importer_mesh.cpp
parent94dbf69f5d6b7d2fd9561692df2e71557607fddc (diff)
downloadredot-engine-684752e75bdeb58727c2d9b0ff0265d7fcd47de0.tar.gz
Replace error checks against `size` with `is_empty`
Diffstat (limited to 'scene/resources/importer_mesh.cpp')
-rw-r--r--scene/resources/importer_mesh.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/resources/importer_mesh.cpp b/scene/resources/importer_mesh.cpp
index 2ffb8da46c..952e99608d 100644
--- a/scene/resources/importer_mesh.cpp
+++ b/scene/resources/importer_mesh.cpp
@@ -186,7 +186,7 @@ void ImporterMesh::add_surface(Mesh::PrimitiveType p_primitive, const Array &p_a
Surface::LOD lod;
lod.distance = E;
lod.indices = p_lods[E];
- ERR_CONTINUE(lod.indices.size() == 0);
+ ERR_CONTINUE(lod.indices.is_empty());
s.lods.push_back(lod);
}
@@ -684,7 +684,7 @@ bool ImporterMesh::has_mesh() const {
}
Ref<ArrayMesh> ImporterMesh::get_mesh(const Ref<ArrayMesh> &p_base) {
- ERR_FAIL_COND_V(surfaces.size() == 0, Ref<ArrayMesh>());
+ ERR_FAIL_COND_V(surfaces.is_empty(), Ref<ArrayMesh>());
if (mesh.is_null()) {
if (p_base.is_valid()) {