summaryrefslogtreecommitdiff
path: root/editor/plugins/version_control_editor_plugin.cpp
diff options
context:
space:
mode:
authorNathan Franke <natfra@pm.me>2021-12-09 03:42:46 -0600
committerNathan Franke <natfra@pm.me>2021-12-09 04:48:38 -0600
commit49403cbfa0399bb4284ea5c36cc90216a0bda6ff (patch)
treecaa6c7249d35d83b288a180a4f5d7e4fd959704f /editor/plugins/version_control_editor_plugin.cpp
parent31ded7e126b9d71ed8dddab9ffc1ce813f1a8ec2 (diff)
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/plugins/version_control_editor_plugin.cpp')
-rw-r--r--editor/plugins/version_control_editor_plugin.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/version_control_editor_plugin.cpp b/editor/plugins/version_control_editor_plugin.cpp
index 5336788d98..eea0d2789d 100644
--- a/editor/plugins/version_control_editor_plugin.cpp
+++ b/editor/plugins/version_control_editor_plugin.cpp
@@ -266,7 +266,7 @@ void VersionControlEditorPlugin::_display_file_diff(String p_file_path) {
void VersionControlEditorPlugin::_refresh_file_diff() {
String open_file = diff_file_name->get_text();
- if (open_file != "") {
+ if (!open_file.is_empty()) {
_display_file_diff(diff_file_name->get_text());
}
}
@@ -299,7 +299,7 @@ void VersionControlEditorPlugin::_update_commit_status() {
}
void VersionControlEditorPlugin::_update_commit_button() {
- commit_button->set_disabled(commit_message->get_text().strip_edges() == "");
+ commit_button->set_disabled(commit_message->get_text().strip_edges().is_empty());
}
void VersionControlEditorPlugin::_commit_message_gui_input(const Ref<InputEvent> &p_event) {