mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Merge pull request #104375 from YYF233333/is_empty
Replace `size() == 0` with `is_empty()`
This commit is contained in:
commit
9f222d500d
153 changed files with 316 additions and 316 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue