mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Replace size() == 0 with is_empty().
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -484,7 +484,7 @@ public:
|
||||
LOC_OUTSIDE = -1
|
||||
};
|
||||
|
||||
if (polygon.size() == 0) {
|
||||
if (polygon.is_empty()) {
|
||||
return polygon;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user