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/import/dynamicfont_import_settings.cpp | |
parent | 31ded7e126b9d71ed8dddab9ffc1ce813f1a8ec2 (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/import/dynamicfont_import_settings.cpp')
-rw-r--r-- | editor/import/dynamicfont_import_settings.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/import/dynamicfont_import_settings.cpp b/editor/import/dynamicfont_import_settings.cpp index 83c0f56d87..b63c2bf350 100644 --- a/editor/import/dynamicfont_import_settings.cpp +++ b/editor/import/dynamicfont_import_settings.cpp @@ -1597,7 +1597,7 @@ DynamicFontImportSettings::DynamicFontImportSettings() { menu_langs = memnew(PopupMenu); menu_langs->set_name("Language"); - for (int i = 0; langs[i].name != String(); i++) { + for (int i = 0; !langs[i].name.is_empty(); i++) { if (langs[i].name == "-") { menu_langs->add_separator(); } else { @@ -1609,7 +1609,7 @@ DynamicFontImportSettings::DynamicFontImportSettings() { menu_scripts = memnew(PopupMenu); menu_scripts->set_name("Script"); - for (int i = 0; scripts[i].name != String(); i++) { + for (int i = 0; !scripts[i].name.is_empty(); i++) { if (scripts[i].name == "-") { menu_scripts->add_separator(); } else { @@ -1826,7 +1826,7 @@ DynamicFontImportSettings::DynamicFontImportSettings() { glyph_tree->connect("item_selected", callable_mp(this, &DynamicFontImportSettings::_range_selected)); glyph_tree->set_v_size_flags(Control::SIZE_EXPAND_FILL); glyph_root = glyph_tree->create_item(); - for (int i = 0; unicode_ranges[i].name != String(); i++) { + for (int i = 0; !unicode_ranges[i].name.is_empty(); i++) { _add_glyph_range_item(unicode_ranges[i].start, unicode_ranges[i].end, unicode_ranges[i].name); } |