summaryrefslogtreecommitdiff
path: root/scene/main/node.cpp
diff options
context:
space:
mode:
authorMarc Gilleron <marc.gilleron@gmail.com>2022-09-19 16:43:15 +0100
committerMarc Gilleron <marc.gilleron@gmail.com>2022-09-19 16:43:15 +0100
commitaed3822a93a54e285bfb711ff91b4cb86ea94841 (patch)
tree5b2ce97169ae411015041e35005984d9cc5762b9 /scene/main/node.cpp
parent908795301b9e4fcf24b115329a48d7d295c13a1a (diff)
Change return type of `get_configuration_warnings` to `PackedStringArray`
Diffstat (limited to 'scene/main/node.cpp')
-rw-r--r--scene/main/node.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 29f4d4fb1c..a2b0f1a825 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -2640,21 +2640,19 @@ void Node::clear_internal_tree_resource_paths() {
}
}
-TypedArray<String> Node::get_configuration_warnings() const {
- TypedArray<String> ret;
+PackedStringArray Node::get_configuration_warnings() const {
+ PackedStringArray ret;
Vector<String> warnings;
if (GDVIRTUAL_CALL(_get_configuration_warnings, warnings)) {
- for (int i = 0; i < warnings.size(); i++) {
- ret.push_back(warnings[i]);
- }
+ ret.append_array(warnings);
}
return ret;
}
String Node::get_configuration_warnings_as_string() const {
- TypedArray<String> warnings = get_configuration_warnings();
+ PackedStringArray warnings = get_configuration_warnings();
String all_warnings = String();
for (int i = 0; i < warnings.size(); i++) {
if (i > 0) {
@@ -2662,7 +2660,7 @@ String Node::get_configuration_warnings_as_string() const {
}
// Format as a bullet point list to make multiple warnings easier to distinguish
// from each other.
- all_warnings += String::utf8("• ") + String(warnings[i]);
+ all_warnings += String::utf8("• ") + warnings[i];
}
return all_warnings;
}