From 49403cbfa0399bb4284ea5c36cc90216a0bda6ff Mon Sep 17 00:00:00 2001 From: Nathan Franke Date: Thu, 9 Dec 2021 03:42:46 -0600 Subject: Replace String comparisons with "", String() to is_empty() Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings --- platform/osx/export/export_plugin.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'platform/osx/export/export_plugin.cpp') diff --git a/platform/osx/export/export_plugin.cpp b/platform/osx/export/export_plugin.cpp index 36a2e5e205..8126510245 100644 --- a/platform/osx/export/export_plugin.cpp +++ b/platform/osx/export/export_plugin.cpp @@ -481,10 +481,10 @@ Error EditorExportPlatformOSX::export_project(const Ref &p_p src_pkg_name = p_preset->get("custom_template/release"); } - if (src_pkg_name == "") { + if (src_pkg_name.is_empty()) { String err; src_pkg_name = find_export_template("osx.zip", &err); - if (src_pkg_name == "") { + if (src_pkg_name.is_empty()) { EditorNode::add_io_error(err); return ERR_FILE_NOT_FOUND; } @@ -607,7 +607,7 @@ Error EditorExportPlatformOSX::export_project(const Ref &p_p iconpath = ProjectSettings::get_singleton()->get("application/config/icon"); } - if (iconpath != "") { + if (!iconpath.is_empty()) { if (iconpath.get_extension() == "icns") { FileAccess *icon = FileAccess::open(iconpath, FileAccess::READ); if (icon) { @@ -695,7 +695,7 @@ Error EditorExportPlatformOSX::export_project(const Ref &p_p String ent_path = p_preset->get("codesign/entitlements/custom_file"); String hlp_ent_path = EditorPaths::get_singleton()->get_cache_dir().plus_file(pkg_name + "_helper.entitlements"); - if (sign_enabled && (ent_path == "")) { + if (sign_enabled && (ent_path.is_empty())) { ent_path = EditorPaths::get_singleton()->get_cache_dir().plus_file(pkg_name + ".entitlements"); FileAccess *ent_f = FileAccess::open(ent_path, FileAccess::WRITE); -- cgit v1.2.3