summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2024-06-03 13:42:31 +0200
committerA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2024-06-03 13:42:31 +0200
commit0f72b15bc2181bd02923599d2587524b1ba0e8be (patch)
tree64d5214c1cb4bbb41331ea1bf9843de77e1a1b60
parent0d11108a01ca5017e055e498c579a271f3153ee1 (diff)
downloadredot-engine-0f72b15bc2181bd02923599d2587524b1ba0e8be.tar.gz
Fix some incorrect uses of `String` over `StringName`
These were accepting `SNAME` assignments
-rw-r--r--editor/gui/scene_tree_editor.cpp2
-rw-r--r--editor/plugins/control_editor_plugin.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/editor/gui/scene_tree_editor.cpp b/editor/gui/scene_tree_editor.cpp
index ddf22c46e6..7e2d6c9d1e 100644
--- a/editor/gui/scene_tree_editor.cpp
+++ b/editor/gui/scene_tree_editor.cpp
@@ -291,7 +291,7 @@ void SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
const PackedStringArray warnings = p_node->get_configuration_warnings();
const int num_warnings = warnings.size();
if (num_warnings > 0) {
- String warning_icon;
+ StringName warning_icon;
if (num_warnings == 1) {
warning_icon = SNAME("NodeWarning");
} else if (num_warnings <= 3) {
diff --git a/editor/plugins/control_editor_plugin.cpp b/editor/plugins/control_editor_plugin.cpp
index a3804eff00..3479d22267 100644
--- a/editor/plugins/control_editor_plugin.cpp
+++ b/editor/plugins/control_editor_plugin.cpp
@@ -360,9 +360,9 @@ void EditorPropertySizeFlags::setup(const Vector<String> &p_options, bool p_vert
}
Control *gui_base = EditorNode::get_singleton()->get_gui_base();
- String wide_preset_icon = SNAME("ControlAlignHCenterWide");
- String begin_preset_icon = SNAME("ControlAlignCenterLeft");
- String end_preset_icon = SNAME("ControlAlignCenterRight");
+ StringName wide_preset_icon = SNAME("ControlAlignHCenterWide");
+ StringName begin_preset_icon = SNAME("ControlAlignCenterLeft");
+ StringName end_preset_icon = SNAME("ControlAlignCenterRight");
if (vertical) {
wide_preset_icon = SNAME("ControlAlignVCenterWide");
begin_preset_icon = SNAME("ControlAlignCenterTop");