1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Replace size() == 0 with is_empty().

This commit is contained in:
Yufeng Ying
2025-03-20 00:07:31 +08:00
parent c7ea8614d7
commit 4f4031a675
147 changed files with 300 additions and 300 deletions

View File

@@ -394,7 +394,7 @@ void MeshInstance3DEditor::_create_uv_lines(int p_layer) {
Array a = mesh->surface_get_arrays(i);
Vector<Vector2> uv = a[p_layer == 0 ? Mesh::ARRAY_TEX_UV : Mesh::ARRAY_TEX_UV2];
if (uv.size() == 0) {
if (uv.is_empty()) {
err_dialog->set_text(vformat(TTR("Mesh has no UV in layer %d."), p_layer + 1));
err_dialog->popup_centered();
return;
@@ -440,7 +440,7 @@ void MeshInstance3DEditor::_create_uv_lines(int p_layer) {
}
void MeshInstance3DEditor::_debug_uv_draw() {
if (uv_lines.size() == 0) {
if (uv_lines.is_empty()) {
return;
}