summaryrefslogtreecommitdiff
path: root/editor/action_map_editor.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-12-10 08:56:31 +0100
committerGitHub <noreply@github.com>2021-12-10 08:56:31 +0100
commitbdf8340e5993ec3f86e4bf1d5ede48df7d023a12 (patch)
tree1e366583662397e366d4f84bb334660db37cb5bd /editor/action_map_editor.cpp
parent5ad9d8bad69309d71ea55f3d799af7e3711dc262 (diff)
parent49403cbfa0399bb4284ea5c36cc90216a0bda6ff (diff)
Merge pull request #43181 from nathanfranke/string-empty
Replace String comparisons with "", String() to is_empty()
Diffstat (limited to 'editor/action_map_editor.cpp')
-rw-r--r--editor/action_map_editor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/action_map_editor.cpp b/editor/action_map_editor.cpp
index 9df76b8657..a8d3bfcc90 100644
--- a/editor/action_map_editor.cpp
+++ b/editor/action_map_editor.cpp
@@ -761,7 +761,7 @@ void ActionMapEditor::_add_action_pressed() {
}
void ActionMapEditor::_add_action(const String &p_name) {
- if (p_name == "" || !_is_action_name_valid(p_name)) {
+ if (p_name.is_empty() || !_is_action_name_valid(p_name)) {
show_message(TTR("Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or '\"'"));
return;
}
@@ -785,7 +785,7 @@ void ActionMapEditor::_action_edited() {
return;
}
- if (new_name == "" || !_is_action_name_valid(new_name)) {
+ if (new_name.is_empty() || !_is_action_name_valid(new_name)) {
ti->set_text(0, old_name);
show_message(TTR("Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or '\"'"));
return;