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 --- core/string/node_path.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/string/node_path.cpp') diff --git a/core/string/node_path.cpp b/core/string/node_path.cpp index 7ab85ac9d0..bb9a44ccaf 100644 --- a/core/string/node_path.cpp +++ b/core/string/node_path.cpp @@ -368,7 +368,7 @@ NodePath::NodePath(const String &p_path) { for (int i = from; i <= path.length(); i++) { if (path[i] == ':' || path[i] == 0) { String str = path.substr(from, i - from); - if (str == "") { + if (str.is_empty()) { if (path[i] == 0) { continue; // Allow end-of-path : } -- cgit v1.2.3