1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-21 14:57:09 +00:00

Optimize Node::add_child validation

Adding 10k nodes is almost twice as fast.
This commit is contained in:
Juan Linietsky
2023-04-06 17:54:56 +02:00
parent 92b7a9603a
commit 223ce4fcb9
5 changed files with 101 additions and 12 deletions

View File

@@ -983,7 +983,7 @@ void SceneTreeEditor::_renamed() {
String new_name = raw_new_name.validate_node_name();
if (new_name != raw_new_name) {
error->set_text(TTR("Invalid node name, the following characters are not allowed:") + "\n" + String::invalid_node_name_characters);
error->set_text(TTR("Invalid node name, the following characters are not allowed:") + "\n" + String::get_invalid_node_name_characters());
error->popup_centered();
if (new_name.is_empty()) {