Merge pull request #104375 from YYF233333/is_empty

Replace `size() == 0` with `is_empty()`
This commit is contained in:
Thaddeus Crews 2025-04-02 07:37:31 -05:00
commit 9f222d500d
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC
153 changed files with 316 additions and 316 deletions

View file

@ -406,7 +406,7 @@ public:
}
Vector<Vector3> convex_points = Geometry3D::compute_convex_mesh_points(&p_convex[0], p_convex.size());
if (convex_points.size() == 0) {
if (convex_points.is_empty()) {
return 0;
}

View file

@ -2237,7 +2237,7 @@ real_t ConvexHullComputer::compute(const Vector3 *p_coords, int32_t p_count, rea
Error ConvexHullComputer::convex_hull(const Vector<Vector3> &p_points, Geometry3D::MeshData &r_mesh) {
r_mesh = Geometry3D::MeshData(); // clear
if (p_points.size() == 0) {
if (p_points.is_empty()) {
return FAILED; // matches QuickHull
}

View file

@ -484,7 +484,7 @@ public:
LOC_OUTSIDE = -1
};
if (polygon.size() == 0) {
if (polygon.is_empty()) {
return polygon;
}

View file

@ -323,7 +323,7 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry3D::MeshData &r_
for (List<Face>::Element *&E : new_faces) {
Face &f2 = E->get();
if (f2.points_over.size() == 0) {
if (f2.points_over.is_empty()) {
faces.move_to_front(E);
}
}