diff options
author | Nathan Franke <natfra@pm.me> | 2021-12-09 03:42:46 -0600 |
---|---|---|
committer | Nathan Franke <natfra@pm.me> | 2021-12-09 04:48:38 -0600 |
commit | 49403cbfa0399bb4284ea5c36cc90216a0bda6ff (patch) | |
tree | caa6c7249d35d83b288a180a4f5d7e4fd959704f /editor/settings_config_dialog.cpp | |
parent | 31ded7e126b9d71ed8dddab9ffc1ce813f1a8ec2 (diff) | |
download | redot-engine-49403cbfa0399bb4284ea5c36cc90216a0bda6ff.tar.gz |
Replace String comparisons with "", String() to is_empty()
Also:
- Adds two stress tests to test_string.h
- Changes to .empty() on std::strings
Diffstat (limited to 'editor/settings_config_dialog.cpp')
-rw-r--r-- | editor/settings_config_dialog.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/settings_config_dialog.cpp b/editor/settings_config_dialog.cpp index a39fdb3878..8e12cb76ef 100644 --- a/editor/settings_config_dialog.cpp +++ b/editor/settings_config_dialog.cpp @@ -148,7 +148,7 @@ void EditorSettingsDialog::unhandled_input(const Ref<InputEvent> &p_event) { if (ED_IS_SHORTCUT("ui_undo", p_event)) { String action = undo_redo->get_current_action_name(); - if (action != "") { + if (!action.is_empty()) { EditorNode::get_log()->add_message("Undo: " + action, EditorLog::MSG_TYPE_EDITOR); } undo_redo->undo(); @@ -158,7 +158,7 @@ void EditorSettingsDialog::unhandled_input(const Ref<InputEvent> &p_event) { if (ED_IS_SHORTCUT("ui_redo", p_event)) { undo_redo->redo(); String action = undo_redo->get_current_action_name(); - if (action != "") { + if (!action.is_empty()) { EditorNode::get_log()->add_message("Redo: " + action, EditorLog::MSG_TYPE_EDITOR); } handled = true; |