mirror of
https://github.com/godotengine/godot.git
synced 2025-10-25 18:54:43 +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:
parent
31ded7e126
commit
49403cbfa0
226 changed files with 1051 additions and 1034 deletions
|
|
@ -380,7 +380,7 @@ bool EditorExportPlatformJavaScript::can_export(const Ref<EditorExportPreset> &p
|
|||
|
||||
if (p_preset->get("vram_texture_compression/for_mobile")) {
|
||||
String etc_error = test_etc2();
|
||||
if (etc_error != String()) {
|
||||
if (!etc_error.is_empty()) {
|
||||
valid = false;
|
||||
err += etc_error;
|
||||
}
|
||||
|
|
@ -415,7 +415,7 @@ Error EditorExportPlatformJavaScript::export_project(const Ref<EditorExportPrese
|
|||
// Find the correct template
|
||||
String template_path = p_debug ? custom_debug : custom_release;
|
||||
template_path = template_path.strip_edges();
|
||||
if (template_path == String()) {
|
||||
if (template_path.is_empty()) {
|
||||
ExportMode mode = (ExportMode)(int)p_preset->get("variant/export_type");
|
||||
template_path = find_export_template(_get_template_name(mode, p_debug));
|
||||
}
|
||||
|
|
@ -424,7 +424,7 @@ Error EditorExportPlatformJavaScript::export_project(const Ref<EditorExportPrese
|
|||
return ERR_FILE_BAD_PATH;
|
||||
}
|
||||
|
||||
if (template_path != String() && !FileAccess::exists(template_path)) {
|
||||
if (!template_path.is_empty() && !FileAccess::exists(template_path)) {
|
||||
EditorNode::get_singleton()->show_warning(TTR("Template file not found:") + "\n" + template_path);
|
||||
return ERR_FILE_NOT_FOUND;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue