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 /core/string/string_name.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 'core/string/string_name.cpp')
-rw-r--r-- | core/string/string_name.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/string/string_name.cpp b/core/string/string_name.cpp index 9024f60dae..0e3482e873 100644 --- a/core/string/string_name.cpp +++ b/core/string/string_name.cpp @@ -310,7 +310,7 @@ StringName::StringName(const String &p_name, bool p_static) { ERR_FAIL_COND(!configured); - if (p_name == String()) { + if (p_name.is_empty()) { return; } @@ -434,7 +434,7 @@ StringName StringName::search(const char32_t *p_name) { } StringName StringName::search(const String &p_name) { - ERR_FAIL_COND_V(p_name == "", StringName()); + ERR_FAIL_COND_V(p_name.is_empty(), StringName()); MutexLock lock(mutex); |