summaryrefslogtreecommitdiff
path: root/modules/gdnative
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdnative')
-rw-r--r--modules/gdnative/gdnative.cpp2
-rw-r--r--modules/gdnative/gdnative/array.cpp4
-rw-r--r--modules/gdnative/gdnative/dictionary.cpp4
-rw-r--r--modules/gdnative/gdnative/packed_arrays.cpp40
-rw-r--r--modules/gdnative/gdnative/rect2.cpp8
-rw-r--r--modules/gdnative/gdnative/string.cpp4
-rw-r--r--modules/gdnative/gdnative_api.json28
-rw-r--r--modules/gdnative/gdnative_library_editor_plugin.cpp12
-rw-r--r--modules/gdnative/include/gdnative/array.h2
-rw-r--r--modules/gdnative/include/gdnative/dictionary.h2
-rw-r--r--modules/gdnative/include/gdnative/packed_arrays.h20
-rw-r--r--modules/gdnative/include/gdnative/string.h2
-rw-r--r--modules/gdnative/include/text/godot_text.h2
-rw-r--r--modules/gdnative/nativescript/api_generator.cpp2
-rw-r--r--modules/gdnative/nativescript/nativescript.cpp4
-rw-r--r--modules/gdnative/pluginscript/pluginscript_language.cpp2
-rw-r--r--modules/gdnative/tests/test_string.h4
-rw-r--r--modules/gdnative/text/text_server_gdnative.cpp4
18 files changed, 73 insertions, 73 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/rect2.cpp b/modules/gdnative/gdnative/rect2.cpp
index 0576fb569f..9897b96c09 100644
--- a/modules/gdnative/gdnative/rect2.cpp
+++ b/modules/gdnative/gdnative/rect2.cpp
@@ -127,10 +127,10 @@ godot_rect2 GDAPI godot_rect2_grow_individual(const godot_rect2 *p_self, const g
return dest;
}
-godot_rect2 GDAPI godot_rect2_grow_margin(const godot_rect2 *p_self, const godot_int p_margin, const godot_real p_by) {
+godot_rect2 GDAPI godot_rect2_grow_margin(const godot_rect2 *p_self, const godot_int p_side, const godot_real p_by) {
godot_rect2 dest;
const Rect2 *self = (const Rect2 *)p_self;
- *((Rect2 *)&dest) = self->grow_margin((Margin)p_margin, p_by);
+ *((Rect2 *)&dest) = self->grow_margin((Side)p_side, p_by);
return dest;
}
@@ -270,10 +270,10 @@ godot_rect2i GDAPI godot_rect2i_grow_individual(const godot_rect2i *p_self, cons
return dest;
}
-godot_rect2i GDAPI godot_rect2i_grow_margin(const godot_rect2i *p_self, const godot_int p_margin, const godot_int p_by) {
+godot_rect2i GDAPI godot_rect2i_grow_margin(const godot_rect2i *p_self, const godot_int p_side, const godot_int p_by) {
godot_rect2i dest;
const Rect2i *self = (const Rect2i *)p_self;
- *((Rect2i *)&dest) = self->grow_margin((Margin)p_margin, p_by);
+ *((Rect2i *)&dest) = self->grow_margin((Side)p_side, p_by);
return dest;
}
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 52f8c837c4..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;
}
@@ -327,7 +327,7 @@ GDNativeLibraryEditor::GDNativeLibraryEditor() {
VBoxContainer *container = memnew(VBoxContainer);
add_child(container);
- container->set_anchors_and_margins_preset(PRESET_WIDE);
+ container->set_anchors_and_offsets_preset(PRESET_WIDE);
HBoxContainer *hbox = memnew(HBoxContainer);
container->add_child(hbox);
@@ -381,7 +381,7 @@ GDNativeLibraryEditor::GDNativeLibraryEditor() {
new_architecture_input = memnew(LineEdit);
new_architecture_dialog->add_child(new_architecture_input);
// new_architecture_dialog->set_custom_minimum_size(Vector2(300, 80) * EDSCALE);
- new_architecture_input->set_anchors_and_margins_preset(PRESET_HCENTER_WIDE, PRESET_MODE_MINSIZE, 5 * EDSCALE);
+ new_architecture_input->set_anchors_and_offsets_preset(PRESET_HCENTER_WIDE, PRESET_MODE_MINSIZE, 5 * EDSCALE);
new_architecture_dialog->get_ok_button()->connect("pressed", callable_mp(this, &GDNativeLibraryEditor::_on_create_new_entry));
}
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) {