1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +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:
Nathan Franke
2021-12-09 03:42:46 -06:00
parent 31ded7e126
commit 49403cbfa0
226 changed files with 1051 additions and 1034 deletions

View File

@@ -53,7 +53,7 @@ void ExportTemplateManager::_update_template_status() {
da->list_dir_begin();
if (err == OK) {
String c = da->get_next();
while (c != String()) {
while (!c.is_empty()) {
if (da->current_is_dir() && !c.begins_with(".")) {
templates.insert(c);
}
@@ -424,7 +424,7 @@ bool ExportTemplateManager::_install_file_selected(const String &p_file, bool p_
ret = unzGoToNextFile(pkg);
}
if (version == String()) {
if (version.is_empty()) {
EditorNode::get_singleton()->show_warning(TTR("No version.txt found inside the export templates file."));
unzClose(pkg);
return false;