summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-02-02 09:36:27 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-02-02 09:36:27 +0100
commit45b8274dc6c9693890675d589582705f97c1d99a (patch)
tree4b727d56f1ef0b99da168a4332cd5a1d50aec260
parent30f5fc0aa36eb55ab0032c226400d0bfde5b284d (diff)
parent0fcdf48f8397c4bbcd78202369c092c413ffbb35 (diff)
Merge pull request #72528 from aaronfranke/dont-have-slashes
Remove unused `has_slashes` from NodePath
-rw-r--r--core/string/node_path.cpp5
-rw-r--r--core/string/node_path.h1
2 files changed, 0 insertions, 6 deletions
diff --git a/core/string/node_path.cpp b/core/string/node_path.cpp
index 9ce1c2d4bb..af7c18741d 100644
--- a/core/string/node_path.cpp
+++ b/core/string/node_path.cpp
@@ -339,7 +339,6 @@ NodePath::NodePath(const Vector<StringName> &p_path, bool p_absolute) {
data->refcount.init();
data->absolute = p_absolute;
data->path = p_path;
- data->has_slashes = true;
data->hash_cache_valid = false;
}
@@ -353,7 +352,6 @@ NodePath::NodePath(const Vector<StringName> &p_path, const Vector<StringName> &p
data->absolute = p_absolute;
data->path = p_path;
data->subpath = p_subpath;
- data->has_slashes = true;
data->hash_cache_valid = false;
}
@@ -373,7 +371,6 @@ NodePath::NodePath(const String &p_path) {
bool absolute = (path[0] == '/');
bool last_is_slash = true;
- bool has_slashes = false;
int slices = 0;
int subpath_pos = path.find(":");
@@ -402,7 +399,6 @@ NodePath::NodePath(const String &p_path) {
for (int i = (int)absolute; i < path.length(); i++) {
if (path[i] == '/') {
last_is_slash = true;
- has_slashes = true;
} else {
if (last_is_slash) {
slices++;
@@ -419,7 +415,6 @@ NodePath::NodePath(const String &p_path) {
data = memnew(Data);
data->refcount.init();
data->absolute = absolute;
- data->has_slashes = has_slashes;
data->subpath = subpath;
data->hash_cache_valid = false;
diff --git a/core/string/node_path.h b/core/string/node_path.h
index 7053798cb2..876d69924e 100644
--- a/core/string/node_path.h
+++ b/core/string/node_path.h
@@ -42,7 +42,6 @@ class NodePath {
StringName concatenated_path;
StringName concatenated_subpath;
bool absolute;
- bool has_slashes;
mutable bool hash_cache_valid;
mutable uint32_t hash_cache;
};