You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-28 16:07:14 +00:00
Replace size() == 0 with is_empty().
This commit is contained in:
@@ -605,7 +605,7 @@ bool GridMap::_octant_update(const OctantKey &p_key) {
|
||||
}
|
||||
g.multimesh_instances.clear();
|
||||
|
||||
if (g.cells.size() == 0) {
|
||||
if (g.cells.is_empty()) {
|
||||
//octant no longer needed
|
||||
_octant_clean_up(p_key);
|
||||
return true;
|
||||
@@ -637,7 +637,7 @@ bool GridMap::_octant_update(const OctantKey &p_key) {
|
||||
xform.basis = _ortho_bases[c.rot];
|
||||
xform.set_origin(cellpos * cell_size + ofs);
|
||||
xform.basis.scale(Vector3(cell_scale, cell_scale, cell_scale));
|
||||
if (baked_meshes.size() == 0) {
|
||||
if (baked_meshes.is_empty()) {
|
||||
if (mesh_library->get_item_mesh(c.item).is_valid()) {
|
||||
if (!multimesh_items.has(c.item)) {
|
||||
multimesh_items[c.item] = List<Pair<Transform3D, IndexKey>>();
|
||||
@@ -716,7 +716,7 @@ bool GridMap::_octant_update(const OctantKey &p_key) {
|
||||
#endif // defined(DEBUG_ENABLED) && !defined(NAVIGATION_3D_DISABLED)
|
||||
|
||||
//update multimeshes, only if not baked
|
||||
if (baked_meshes.size() == 0) {
|
||||
if (baked_meshes.is_empty()) {
|
||||
for (const KeyValue<int, List<Pair<Transform3D, IndexKey>>> &E : multimesh_items) {
|
||||
Octant::MultimeshInstance mmi;
|
||||
|
||||
@@ -1642,7 +1642,7 @@ void GridMap::_update_octant_navigation_debug_edge_connections_mesh(const Octant
|
||||
}
|
||||
}
|
||||
|
||||
if (vertex_array.size() == 0) {
|
||||
if (vertex_array.is_empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user