summaryrefslogtreecommitdiff
path: root/modules/gridmap
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 /modules/gridmap
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 'modules/gridmap')
-rw-r--r--modules/gridmap/grid_map_editor_plugin.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp
index cf37f75d05..c2169c6335 100644
--- a/modules/gridmap/grid_map_editor_plugin.cpp
+++ b/modules/gridmap/grid_map_editor_plugin.cpp
@@ -885,11 +885,11 @@ void GridMapEditor::update_palette() {
String name = mesh_library->get_item_name(id);
Ref<Texture2D> preview = mesh_library->get_item_preview(id);
- if (name == "") {
+ if (name.is_empty()) {
name = "#" + itos(id);
}
- if (filter != "" && !filter.is_subsequence_ofi(name)) {
+ if (!filter.is_empty() && !filter.is_subsequence_ofi(name)) {
continue;
}