summaryrefslogtreecommitdiffstats
path: root/editor/dependency_editor.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/dependency_editor.cpp
parent31ded7e126b9d71ed8dddab9ffc1ce813f1a8ec2 (diff)
downloadredot-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/dependency_editor.cpp')
-rw-r--r--editor/dependency_editor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp
index 7ab5d9a97c..1cc8cc01ce 100644
--- a/editor/dependency_editor.cpp
+++ b/editor/dependency_editor.cpp
@@ -75,7 +75,7 @@ void DependencyEditor::_fix_and_find(EditorFileSystemDirectory *efsd, Map<String
String path = efsd->get_file_path(i);
for (KeyValue<String, String> &E : candidates[file]) {
- if (E.value == String()) {
+ if (E.value.is_empty()) {
E.value = path;
continue;
}
@@ -135,7 +135,7 @@ void DependencyEditor::_fix_all() {
for (KeyValue<String, Map<String, String>> &E : candidates) {
for (const KeyValue<String, String> &F : E.value) {
- if (F.value != String()) {
+ if (!F.value.is_empty()) {
remaps[F.key] = F.value;
}
}