diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2020-12-28 13:23:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-28 13:23:25 +0100 |
commit | be509bf5e4d00b33f2867e6d06a23285b2a8fd29 (patch) | |
tree | 975e0a7384bc6fc7cf5b73b9ddc1e8eef13579d8 /modules/gdnative | |
parent | 886571e0fc54914f161ab3f1ccf9bfe40411bc20 (diff) | |
parent | 5b937d493f0046543a77a0be7920ad39f1e5fc3c (diff) |
Merge pull request #44401 from madmiraal/rename-empty-is_empty
Rename empty() to is_empty()
Diffstat (limited to 'modules/gdnative')
-rw-r--r-- | modules/gdnative/gdnative.cpp | 2 | ||||
-rw-r--r-- | modules/gdnative/gdnative/array.cpp | 4 | ||||
-rw-r--r-- | modules/gdnative/gdnative/dictionary.cpp | 4 | ||||
-rw-r--r-- | modules/gdnative/gdnative/packed_arrays.cpp | 40 | ||||
-rw-r--r-- | modules/gdnative/gdnative/string.cpp | 4 | ||||
-rw-r--r-- | modules/gdnative/gdnative_api.json | 28 | ||||
-rw-r--r-- | modules/gdnative/gdnative_library_editor_plugin.cpp | 8 | ||||
-rw-r--r-- | modules/gdnative/include/gdnative/array.h | 2 | ||||
-rw-r--r-- | modules/gdnative/include/gdnative/dictionary.h | 2 | ||||
-rw-r--r-- | modules/gdnative/include/gdnative/packed_arrays.h | 20 | ||||
-rw-r--r-- | modules/gdnative/include/gdnative/string.h | 2 | ||||
-rw-r--r-- | modules/gdnative/include/text/godot_text.h | 2 | ||||
-rw-r--r-- | modules/gdnative/nativescript/api_generator.cpp | 2 | ||||
-rw-r--r-- | modules/gdnative/nativescript/nativescript.cpp | 4 | ||||
-rw-r--r-- | modules/gdnative/pluginscript/pluginscript_language.cpp | 2 | ||||
-rw-r--r-- | modules/gdnative/tests/test_string.h | 4 | ||||
-rw-r--r-- | modules/gdnative/text/text_server_gdnative.cpp | 4 |
17 files changed, 67 insertions, 67 deletions
diff --git a/modules/gdnative/gdnative.cpp b/modules/gdnative/gdnative.cpp index f397ee96c5..bb72dd69b8 100644 --- a/modules/gdnative/gdnative.cpp +++ b/modules/gdnative/gdnative.cpp @@ -286,7 +286,7 @@ bool GDNative::initialize() { } String lib_path = library->get_current_library_path(); - if (lib_path.empty()) { + if (lib_path.is_empty()) { ERR_PRINT("No library set for this platform"); return false; } diff --git a/modules/gdnative/gdnative/array.cpp b/modules/gdnative/gdnative/array.cpp index 863889acbc..403d651165 100644 --- a/modules/gdnative/gdnative/array.cpp +++ b/modules/gdnative/gdnative/array.cpp @@ -215,9 +215,9 @@ godot_int GDAPI godot_array_count(const godot_array *p_self, const godot_variant return self->count(*val); } -godot_bool GDAPI godot_array_empty(const godot_array *p_self) { +godot_bool GDAPI godot_array_is_empty(const godot_array *p_self) { const Array *self = (const Array *)p_self; - return self->empty(); + return self->is_empty(); } void GDAPI godot_array_erase(godot_array *p_self, const godot_variant *p_value) { diff --git a/modules/gdnative/gdnative/dictionary.cpp b/modules/gdnative/gdnative/dictionary.cpp index b6900b28bb..b34d73dc40 100644 --- a/modules/gdnative/gdnative/dictionary.cpp +++ b/modules/gdnative/gdnative/dictionary.cpp @@ -71,9 +71,9 @@ godot_int GDAPI godot_dictionary_size(const godot_dictionary *p_self) { return self->size(); } -godot_bool GDAPI godot_dictionary_empty(const godot_dictionary *p_self) { +godot_bool GDAPI godot_dictionary_is_empty(const godot_dictionary *p_self) { const Dictionary *self = (const Dictionary *)p_self; - return self->empty(); + return self->is_empty(); } void GDAPI godot_dictionary_clear(godot_dictionary *p_self) { diff --git a/modules/gdnative/gdnative/packed_arrays.cpp b/modules/gdnative/gdnative/packed_arrays.cpp index cc1e05b8a4..351c456a5d 100644 --- a/modules/gdnative/gdnative/packed_arrays.cpp +++ b/modules/gdnative/gdnative/packed_arrays.cpp @@ -150,9 +150,9 @@ godot_int GDAPI godot_packed_byte_array_size(const godot_packed_byte_array *p_se return self->size(); } -godot_bool GDAPI godot_packed_byte_array_empty(const godot_packed_byte_array *p_self) { +godot_bool GDAPI godot_packed_byte_array_is_empty(const godot_packed_byte_array *p_self) { const Vector<uint8_t> *self = (const Vector<uint8_t> *)p_self; - return self->empty(); + return self->is_empty(); } void GDAPI godot_packed_byte_array_destroy(godot_packed_byte_array *p_self) { @@ -254,9 +254,9 @@ godot_int GDAPI godot_packed_int32_array_size(const godot_packed_int32_array *p_ return self->size(); } -godot_bool GDAPI godot_packed_int32_array_empty(const godot_packed_int32_array *p_self) { +godot_bool GDAPI godot_packed_int32_array_is_empty(const godot_packed_int32_array *p_self) { const Vector<int32_t> *self = (const Vector<int32_t> *)p_self; - return self->empty(); + return self->is_empty(); } void GDAPI godot_packed_int32_array_destroy(godot_packed_int32_array *p_self) { @@ -358,9 +358,9 @@ godot_int GDAPI godot_packed_int64_array_size(const godot_packed_int64_array *p_ return self->size(); } -godot_bool GDAPI godot_packed_int64_array_empty(const godot_packed_int64_array *p_self) { +godot_bool GDAPI godot_packed_int64_array_is_empty(const godot_packed_int64_array *p_self) { const Vector<int64_t> *self = (const Vector<int64_t> *)p_self; - return self->empty(); + return self->is_empty(); } void GDAPI godot_packed_int64_array_destroy(godot_packed_int64_array *p_self) { @@ -462,9 +462,9 @@ godot_int GDAPI godot_packed_float32_array_size(const godot_packed_float32_array return self->size(); } -godot_bool GDAPI godot_packed_float32_array_empty(const godot_packed_float32_array *p_self) { +godot_bool GDAPI godot_packed_float32_array_is_empty(const godot_packed_float32_array *p_self) { const Vector<float> *self = (const Vector<float> *)p_self; - return self->empty(); + return self->is_empty(); } void GDAPI godot_packed_float32_array_destroy(godot_packed_float32_array *p_self) { @@ -566,9 +566,9 @@ godot_int GDAPI godot_packed_float64_array_size(const godot_packed_float64_array return self->size(); } -godot_bool GDAPI godot_packed_float64_array_empty(const godot_packed_float64_array *p_self) { +godot_bool GDAPI godot_packed_float64_array_is_empty(const godot_packed_float64_array *p_self) { const Vector<double> *self = (const Vector<double> *)p_self; - return self->empty(); + return self->is_empty(); } void GDAPI godot_packed_float64_array_destroy(godot_packed_float64_array *p_self) { @@ -679,9 +679,9 @@ godot_int GDAPI godot_packed_string_array_size(const godot_packed_string_array * return self->size(); } -godot_bool GDAPI godot_packed_string_array_empty(const godot_packed_string_array *p_self) { +godot_bool GDAPI godot_packed_string_array_is_empty(const godot_packed_string_array *p_self) { const Vector<String> *self = (const Vector<String> *)p_self; - return self->empty(); + return self->is_empty(); } void GDAPI godot_packed_string_array_destroy(godot_packed_string_array *p_self) { @@ -791,9 +791,9 @@ godot_int GDAPI godot_packed_vector2_array_size(const godot_packed_vector2_array return self->size(); } -godot_bool GDAPI godot_packed_vector2_array_empty(const godot_packed_vector2_array *p_self) { +godot_bool GDAPI godot_packed_vector2_array_is_empty(const godot_packed_vector2_array *p_self) { const Vector<Vector2> *self = (const Vector<Vector2> *)p_self; - return self->empty(); + return self->is_empty(); } void GDAPI godot_packed_vector2_array_destroy(godot_packed_vector2_array *p_self) { @@ -903,9 +903,9 @@ godot_int GDAPI godot_packed_vector2i_array_size(const godot_packed_vector2i_arr return self->size(); } -godot_bool GDAPI godot_packed_vector2i_array_empty(const godot_packed_vector2i_array *p_self) { +godot_bool GDAPI godot_packed_vector2i_array_is_empty(const godot_packed_vector2i_array *p_self) { const Vector<Vector2i> *self = (const Vector<Vector2i> *)p_self; - return self->empty(); + return self->is_empty(); } void GDAPI godot_packed_vector2i_array_destroy(godot_packed_vector2i_array *p_self) { @@ -1015,9 +1015,9 @@ godot_int GDAPI godot_packed_vector3_array_size(const godot_packed_vector3_array return self->size(); } -godot_bool GDAPI godot_packed_vector3_array_empty(const godot_packed_vector3_array *p_self) { +godot_bool GDAPI godot_packed_vector3_array_is_empty(const godot_packed_vector3_array *p_self) { const Vector<Vector3> *self = (const Vector<Vector3> *)p_self; - return self->empty(); + return self->is_empty(); } void GDAPI godot_packed_vector3_array_destroy(godot_packed_vector3_array *p_self) { @@ -1127,9 +1127,9 @@ godot_int GDAPI godot_packed_color_array_size(const godot_packed_color_array *p_ return self->size(); } -godot_bool GDAPI godot_packed_color_array_empty(const godot_packed_color_array *p_self) { +godot_bool GDAPI godot_packed_color_array_is_empty(const godot_packed_color_array *p_self) { const Vector<Color> *self = (const Vector<Color> *)p_self; - return self->empty(); + return self->is_empty(); } void GDAPI godot_packed_color_array_destroy(godot_packed_color_array *p_self) { diff --git a/modules/gdnative/gdnative/string.cpp b/modules/gdnative/gdnative/string.cpp index 47c7f7b6e7..743c47c01a 100644 --- a/modules/gdnative/gdnative/string.cpp +++ b/modules/gdnative/gdnative/string.cpp @@ -1087,10 +1087,10 @@ godot_string GDAPI godot_string_sha256_text(const godot_string *p_self) { return result; } -godot_bool godot_string_empty(const godot_string *p_self) { +godot_bool godot_string_is_empty(const godot_string *p_self) { const String *self = (const String *)p_self; - return self->empty(); + return self->is_empty(); } // path functions diff --git a/modules/gdnative/gdnative_api.json b/modules/gdnative/gdnative_api.json index b3fd033e6c..cc24b47a5b 100644 --- a/modules/gdnative/gdnative_api.json +++ b/modules/gdnative/gdnative_api.json @@ -380,7 +380,7 @@ ] }, { - "name": "godot_array_empty", + "name": "godot_array_is_empty", "return_type": "godot_bool", "arguments": [ ["const godot_array *", "p_self"] @@ -1388,7 +1388,7 @@ ] }, { - "name": "godot_dictionary_empty", + "name": "godot_dictionary_is_empty", "return_type": "godot_bool", "arguments": [ ["const godot_dictionary *", "p_self"] @@ -1647,7 +1647,7 @@ ] }, { - "name": "godot_packed_byte_array_empty", + "name": "godot_packed_byte_array_is_empty", "return_type": "godot_bool", "arguments": [ ["const godot_packed_byte_array *", "p_self"] @@ -1793,7 +1793,7 @@ ] }, { - "name": "godot_packed_int32_array_empty", + "name": "godot_packed_int32_array_is_empty", "return_type": "godot_bool", "arguments": [ ["const godot_packed_int32_array *", "p_self"] @@ -1939,7 +1939,7 @@ ] }, { - "name": "godot_packed_int64_array_empty", + "name": "godot_packed_int64_array_is_empty", "return_type": "godot_bool", "arguments": [ ["const godot_packed_int64_array *", "p_self"] @@ -2085,7 +2085,7 @@ ] }, { - "name": "godot_packed_float32_array_empty", + "name": "godot_packed_float32_array_is_empty", "return_type": "godot_bool", "arguments": [ ["const godot_packed_float32_array *", "p_self"] @@ -2231,7 +2231,7 @@ ] }, { - "name": "godot_packed_float64_array_empty", + "name": "godot_packed_float64_array_is_empty", "return_type": "godot_bool", "arguments": [ ["const godot_packed_float64_array *", "p_self"] @@ -2377,7 +2377,7 @@ ] }, { - "name": "godot_packed_string_array_empty", + "name": "godot_packed_string_array_is_empty", "return_type": "godot_bool", "arguments": [ ["const godot_packed_string_array *", "p_self"] @@ -2523,7 +2523,7 @@ ] }, { - "name": "godot_packed_vector2_array_empty", + "name": "godot_packed_vector2_array_is_empty", "return_type": "godot_bool", "arguments": [ ["const godot_packed_vector2_array *", "p_self"] @@ -2669,7 +2669,7 @@ ] }, { - "name": "godot_packed_vector2i_array_empty", + "name": "godot_packed_vector2i_array_is_empty", "return_type": "godot_bool", "arguments": [ ["const godot_packed_vector2i_array *", "p_self"] @@ -2815,7 +2815,7 @@ ] }, { - "name": "godot_packed_vector3_array_empty", + "name": "godot_packed_vector3_array_is_empty", "return_type": "godot_bool", "arguments": [ ["const godot_packed_vector3_array *", "p_self"] @@ -2961,7 +2961,7 @@ ] }, { - "name": "godot_packed_color_array_empty", + "name": "godot_packed_color_array_is_empty", "return_type": "godot_bool", "arguments": [ ["const godot_packed_color_array *", "p_self"] @@ -5005,7 +5005,7 @@ ] }, { - "name": "godot_string_empty", + "name": "godot_string_is_empty", "return_type": "godot_bool", "arguments": [ ["const godot_string *", "p_self"] @@ -7946,7 +7946,7 @@ ] }, { - "name": "godot_packed_glyph_array_empty", + "name": "godot_packed_glyph_array_is_empty", "return_type": "godot_bool", "arguments": [ ["const godot_packed_glyph_array *", "p_self"] diff --git a/modules/gdnative/gdnative_library_editor_plugin.cpp b/modules/gdnative/gdnative_library_editor_plugin.cpp index 5ea5c8ee8d..eafe0f43a4 100644 --- a/modules/gdnative/gdnative_library_editor_plugin.cpp +++ b/modules/gdnative/gdnative_library_editor_plugin.cpp @@ -65,7 +65,7 @@ void GDNativeLibraryEditor::_update_tree() { continue; } Map<String, NativePlatformConfig>::Element *E = platforms.find(filter_list->get_item_metadata(i)); - if (!text.empty()) { + if (!text.is_empty()) { text += ", "; } text += E->get().name; @@ -91,7 +91,7 @@ void GDNativeLibraryEditor::_update_tree() { bit->add_button(1, get_theme_icon("Folder", "EditorIcons"), BUTTON_SELECT_LIBRARY, false, TTR("Select the dynamic library for this entry")); String file = entry_configs[target].library; - if (!file.empty()) { + if (!file.is_empty()) { bit->add_button(1, get_theme_icon("Clear", "EditorIcons"), BUTTON_CLEAR_LIBRARY, false, TTR("Clear")); } bit->set_text(1, file); @@ -195,7 +195,7 @@ void GDNativeLibraryEditor::_on_item_activated() { void GDNativeLibraryEditor::_on_create_new_entry() { String platform = new_architecture_dialog->get_meta("platform"); String entry = new_architecture_input->get_text().strip_edges(); - if (!entry.empty()) { + if (!entry.is_empty()) { platforms[platform].entries.push_back(entry); _update_tree(); } @@ -248,7 +248,7 @@ void GDNativeLibraryEditor::_translate_to_config_file() { for (Map<String, NativePlatformConfig>::Element *E = platforms.front(); E; E = E->next()) { for (List<String>::Element *it = E->value().entries.front(); it; it = it->next()) { String target = E->key() + "." + it->get(); - if (entry_configs[target].library.empty() && entry_configs[target].dependencies.empty()) { + if (entry_configs[target].library.is_empty() && entry_configs[target].dependencies.is_empty()) { continue; } diff --git a/modules/gdnative/include/gdnative/array.h b/modules/gdnative/include/gdnative/array.h index 7a59493b7d..1374a899e5 100644 --- a/modules/gdnative/include/gdnative/array.h +++ b/modules/gdnative/include/gdnative/array.h @@ -87,7 +87,7 @@ void GDAPI godot_array_clear(godot_array *p_self); godot_int GDAPI godot_array_count(const godot_array *p_self, const godot_variant *p_value); -godot_bool GDAPI godot_array_empty(const godot_array *p_self); +godot_bool GDAPI godot_array_is_empty(const godot_array *p_self); void GDAPI godot_array_erase(godot_array *p_self, const godot_variant *p_value); diff --git a/modules/gdnative/include/gdnative/dictionary.h b/modules/gdnative/include/gdnative/dictionary.h index 873efaa9bf..f02e43f173 100644 --- a/modules/gdnative/include/gdnative/dictionary.h +++ b/modules/gdnative/include/gdnative/dictionary.h @@ -67,7 +67,7 @@ godot_dictionary GDAPI godot_dictionary_duplicate(const godot_dictionary *p_self godot_int GDAPI godot_dictionary_size(const godot_dictionary *p_self); -godot_bool GDAPI godot_dictionary_empty(const godot_dictionary *p_self); +godot_bool GDAPI godot_dictionary_is_empty(const godot_dictionary *p_self); void GDAPI godot_dictionary_clear(godot_dictionary *p_self); diff --git a/modules/gdnative/include/gdnative/packed_arrays.h b/modules/gdnative/include/gdnative/packed_arrays.h index ce9579f307..135d4036fc 100644 --- a/modules/gdnative/include/gdnative/packed_arrays.h +++ b/modules/gdnative/include/gdnative/packed_arrays.h @@ -195,7 +195,7 @@ uint8_t GDAPI godot_packed_byte_array_get(const godot_packed_byte_array *p_self, godot_int GDAPI godot_packed_byte_array_size(const godot_packed_byte_array *p_self); -godot_bool GDAPI godot_packed_byte_array_empty(const godot_packed_byte_array *p_self); +godot_bool GDAPI godot_packed_byte_array_is_empty(const godot_packed_byte_array *p_self); void GDAPI godot_packed_byte_array_destroy(godot_packed_byte_array *p_self); @@ -231,7 +231,7 @@ int32_t GDAPI godot_packed_int32_array_get(const godot_packed_int32_array *p_sel godot_int GDAPI godot_packed_int32_array_size(const godot_packed_int32_array *p_self); -godot_bool GDAPI godot_packed_int32_array_empty(const godot_packed_int32_array *p_self); +godot_bool GDAPI godot_packed_int32_array_is_empty(const godot_packed_int32_array *p_self); void GDAPI godot_packed_int32_array_destroy(godot_packed_int32_array *p_self); @@ -267,7 +267,7 @@ int64_t GDAPI godot_packed_int64_array_get(const godot_packed_int64_array *p_sel godot_int GDAPI godot_packed_int64_array_size(const godot_packed_int64_array *p_self); -godot_bool GDAPI godot_packed_int64_array_empty(const godot_packed_int64_array *p_self); +godot_bool GDAPI godot_packed_int64_array_is_empty(const godot_packed_int64_array *p_self); void GDAPI godot_packed_int64_array_destroy(godot_packed_int64_array *p_self); @@ -303,7 +303,7 @@ float GDAPI godot_packed_float32_array_get(const godot_packed_float32_array *p_s godot_int GDAPI godot_packed_float32_array_size(const godot_packed_float32_array *p_self); -godot_bool GDAPI godot_packed_float32_array_empty(const godot_packed_float32_array *p_self); +godot_bool GDAPI godot_packed_float32_array_is_empty(const godot_packed_float32_array *p_self); void GDAPI godot_packed_float32_array_destroy(godot_packed_float32_array *p_self); @@ -339,7 +339,7 @@ double GDAPI godot_packed_float64_array_get(const godot_packed_float64_array *p_ godot_int GDAPI godot_packed_float64_array_size(const godot_packed_float64_array *p_self); -godot_bool GDAPI godot_packed_float64_array_empty(const godot_packed_float64_array *p_self); +godot_bool GDAPI godot_packed_float64_array_is_empty(const godot_packed_float64_array *p_self); void GDAPI godot_packed_float64_array_destroy(godot_packed_float64_array *p_self); @@ -375,7 +375,7 @@ godot_string GDAPI godot_packed_string_array_get(const godot_packed_string_array godot_int GDAPI godot_packed_string_array_size(const godot_packed_string_array *p_self); -godot_bool GDAPI godot_packed_string_array_empty(const godot_packed_string_array *p_self); +godot_bool GDAPI godot_packed_string_array_is_empty(const godot_packed_string_array *p_self); void GDAPI godot_packed_string_array_destroy(godot_packed_string_array *p_self); @@ -411,7 +411,7 @@ godot_vector2 GDAPI godot_packed_vector2_array_get(const godot_packed_vector2_ar godot_int GDAPI godot_packed_vector2_array_size(const godot_packed_vector2_array *p_self); -godot_bool GDAPI godot_packed_vector2_array_empty(const godot_packed_vector2_array *p_self); +godot_bool GDAPI godot_packed_vector2_array_is_empty(const godot_packed_vector2_array *p_self); void GDAPI godot_packed_vector2_array_destroy(godot_packed_vector2_array *p_self); @@ -447,7 +447,7 @@ godot_vector2i GDAPI godot_packed_vector2i_array_get(const godot_packed_vector2i godot_int GDAPI godot_packed_vector2i_array_size(const godot_packed_vector2i_array *p_self); -godot_bool GDAPI godot_packed_vector2i_array_empty(const godot_packed_vector2i_array *p_self); +godot_bool GDAPI godot_packed_vector2i_array_is_empty(const godot_packed_vector2i_array *p_self); void GDAPI godot_packed_vector2i_array_destroy(godot_packed_vector2i_array *p_self); @@ -483,7 +483,7 @@ godot_vector3 GDAPI godot_packed_vector3_array_get(const godot_packed_vector3_ar godot_int GDAPI godot_packed_vector3_array_size(const godot_packed_vector3_array *p_self); -godot_bool GDAPI godot_packed_vector3_array_empty(const godot_packed_vector3_array *p_self); +godot_bool GDAPI godot_packed_vector3_array_is_empty(const godot_packed_vector3_array *p_self); void GDAPI godot_packed_vector3_array_destroy(godot_packed_vector3_array *p_self); @@ -519,7 +519,7 @@ godot_color GDAPI godot_packed_color_array_get(const godot_packed_color_array *p godot_int GDAPI godot_packed_color_array_size(const godot_packed_color_array *p_self); -godot_bool GDAPI godot_packed_color_array_empty(const godot_packed_color_array *p_self); +godot_bool GDAPI godot_packed_color_array_is_empty(const godot_packed_color_array *p_self); void GDAPI godot_packed_color_array_destroy(godot_packed_color_array *p_self); diff --git a/modules/gdnative/include/gdnative/string.h b/modules/gdnative/include/gdnative/string.h index 6043351e84..101e119d4d 100644 --- a/modules/gdnative/include/gdnative/string.h +++ b/modules/gdnative/include/gdnative/string.h @@ -256,7 +256,7 @@ godot_string GDAPI godot_string_sha1_text(const godot_string *p_self); godot_packed_byte_array GDAPI godot_string_sha256_buffer(const godot_string *p_self); godot_string GDAPI godot_string_sha256_text(const godot_string *p_self); -godot_bool godot_string_empty(const godot_string *p_self); +godot_bool godot_string_is_empty(const godot_string *p_self); // path functions godot_string GDAPI godot_string_get_base_dir(const godot_string *p_self); diff --git a/modules/gdnative/include/text/godot_text.h b/modules/gdnative/include/text/godot_text.h index 6885f2463d..200a822e6d 100644 --- a/modules/gdnative/include/text/godot_text.h +++ b/modules/gdnative/include/text/godot_text.h @@ -218,7 +218,7 @@ godot_glyph GDAPI godot_packed_glyph_array_get(const godot_packed_glyph_array *p godot_int GDAPI godot_packed_glyph_array_size(const godot_packed_glyph_array *p_self); -godot_bool GDAPI godot_packed_glyph_array_empty(const godot_packed_glyph_array *p_self); +godot_bool GDAPI godot_packed_glyph_array_is_empty(const godot_packed_glyph_array *p_self); void GDAPI godot_packed_glyph_array_destroy(godot_packed_glyph_array *p_self); diff --git a/modules/gdnative/nativescript/api_generator.cpp b/modules/gdnative/nativescript/api_generator.cpp index 6f2f9bfea9..c10de8d5a0 100644 --- a/modules/gdnative/nativescript/api_generator.cpp +++ b/modules/gdnative/nativescript/api_generator.cpp @@ -295,7 +295,7 @@ List<ClassAPI> generate_c_api_classes() { property_api.index = ClassDB::get_property_index(class_name, p->get().name); - if (!property_api.setter.empty() || !property_api.getter.empty()) { + if (!property_api.setter.is_empty() || !property_api.getter.is_empty()) { class_api.properties.push_back(property_api); } } diff --git a/modules/gdnative/nativescript/nativescript.cpp b/modules/gdnative/nativescript/nativescript.cpp index 0939cfd06a..ad2ae6fd4a 100644 --- a/modules/gdnative/nativescript/nativescript.cpp +++ b/modules/gdnative/nativescript/nativescript.cpp @@ -717,7 +717,7 @@ String NativeScript::get_property_documentation(const StringName &p_path) const } Variant NativeScript::_new(const Variant **p_args, int p_argcount, Callable::CallError &r_error) { - if (lib_path.empty() || class_name.empty() || library.is_null()) { + if (lib_path.is_empty() || class_name.is_empty() || library.is_null()) { r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL; return Variant(); } @@ -1800,7 +1800,7 @@ bool NativeScriptLanguage::handles_global_class_type(const String &p_type) const } String NativeScriptLanguage::get_global_class_name(const String &p_path, String *r_base_type, String *r_icon_path) const { - if (!p_path.empty()) { + if (!p_path.is_empty()) { Ref<NativeScript> script = ResourceLoader::load(p_path, "NativeScript"); if (script.is_valid()) { if (r_base_type) { diff --git a/modules/gdnative/pluginscript/pluginscript_language.cpp b/modules/gdnative/pluginscript/pluginscript_language.cpp index df685e716f..93e3181972 100644 --- a/modules/gdnative/pluginscript/pluginscript_language.cpp +++ b/modules/gdnative/pluginscript/pluginscript_language.cpp @@ -407,7 +407,7 @@ bool PluginScriptLanguage::handles_global_class_type(const String &p_type) const } String PluginScriptLanguage::get_global_class_name(const String &p_path, String *r_base_type, String *r_icon_path) const { - if (!p_path.empty()) { + if (!p_path.is_empty()) { Ref<PluginScript> script = ResourceLoader::load(p_path, "PluginScript"); if (script.is_valid()) { if (r_base_type) { diff --git a/modules/gdnative/tests/test_string.h b/modules/gdnative/tests/test_string.h index 2b1aa5bf28..7eccc74987 100644 --- a/modules/gdnative/tests/test_string.h +++ b/modules/gdnative/tests/test_string.h @@ -259,11 +259,11 @@ TEST_CASE("[GDNative String] Testing for empty string") { godot_string s; godot_string_new_with_latin1_chars(&s, "Mellon"); - CHECK(!godot_string_empty(&s)); + CHECK(!godot_string_is_empty(&s)); godot_string_destroy(&s); godot_string_new_with_latin1_chars(&s, ""); - CHECK(godot_string_empty(&s)); + CHECK(godot_string_is_empty(&s)); godot_string_destroy(&s); } diff --git a/modules/gdnative/text/text_server_gdnative.cpp b/modules/gdnative/text/text_server_gdnative.cpp index cb87adafe8..baaa3c0e21 100644 --- a/modules/gdnative/text/text_server_gdnative.cpp +++ b/modules/gdnative/text/text_server_gdnative.cpp @@ -839,9 +839,9 @@ godot_int GDAPI godot_packed_glyph_array_size(const godot_packed_glyph_array *p_ return self->size(); } -godot_bool GDAPI godot_packed_glyph_array_empty(const godot_packed_glyph_array *p_self) { +godot_bool GDAPI godot_packed_glyph_array_is_empty(const godot_packed_glyph_array *p_self) { const Vector<TextServer::Glyph> *self = (const Vector<TextServer::Glyph> *)p_self; - return self->empty(); + return self->is_empty(); } void GDAPI godot_packed_glyph_array_destroy(godot_packed_glyph_array *p_self) { |