diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-12-10 08:56:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-10 08:56:31 +0100 |
commit | bdf8340e5993ec3f86e4bf1d5ede48df7d023a12 (patch) | |
tree | 1e366583662397e366d4f84bb334660db37cb5bd /platform/android/os_android.cpp | |
parent | 5ad9d8bad69309d71ea55f3d799af7e3711dc262 (diff) | |
parent | 49403cbfa0399bb4284ea5c36cc90216a0bda6ff (diff) |
Merge pull request #43181 from nathanfranke/string-empty
Replace String comparisons with "", String() to is_empty()
Diffstat (limited to 'platform/android/os_android.cpp')
-rw-r--r-- | platform/android/os_android.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp index 0e5e10bc0a..ffd69a56b9 100644 --- a/platform/android/os_android.cpp +++ b/platform/android/os_android.cpp @@ -198,7 +198,7 @@ String OS_Android::get_resource_dir() const { String OS_Android::get_locale() const { String locale = godot_io_java->get_locale(); - if (locale != "") { + if (!locale.is_empty()) { return locale; } @@ -207,7 +207,7 @@ String OS_Android::get_locale() const { String OS_Android::get_model_name() const { String model = godot_io_java->get_model(); - if (model != "") + if (!model.is_empty()) return model; return OS_Unix::get_model_name(); @@ -218,11 +218,11 @@ String OS_Android::get_data_path() const { } String OS_Android::get_user_data_dir() const { - if (data_dir_cache != String()) + if (!data_dir_cache.is_empty()) return data_dir_cache; String data_dir = godot_io_java->get_user_data_dir(); - if (data_dir != "") { + if (!data_dir.is_empty()) { data_dir_cache = _remove_symlink(data_dir); return data_dir_cache; } @@ -230,11 +230,11 @@ String OS_Android::get_user_data_dir() const { } String OS_Android::get_cache_path() const { - if (cache_dir_cache != String()) + if (!cache_dir_cache.is_empty()) return cache_dir_cache; String cache_dir = godot_io_java->get_cache_dir(); - if (cache_dir != "") { + if (!cache_dir.is_empty()) { cache_dir_cache = _remove_symlink(cache_dir); return cache_dir_cache; } @@ -243,7 +243,7 @@ String OS_Android::get_cache_path() const { String OS_Android::get_unique_id() const { String unique_id = godot_io_java->get_unique_id(); - if (unique_id != "") + if (!unique_id.is_empty()) return unique_id; return OS::get_unique_id(); |