You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
Replace String comparisons with "", String() to is_empty()
Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user