diff options
Diffstat (limited to 'core/node_path.cpp')
-rw-r--r-- | core/node_path.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/node_path.cpp b/core/node_path.cpp index 0e4f2eeaf0..fd28815704 100644 --- a/core/node_path.cpp +++ b/core/node_path.cpp @@ -62,12 +62,14 @@ bool NodePath::is_absolute() const { return data->absolute; } + int NodePath::get_name_count() const { if (!data) return 0; return data->path.size(); } + StringName NodePath::get_name(int p_idx) const { ERR_FAIL_COND_V(!data, StringName()); ERR_FAIL_INDEX_V(p_idx, data->path.size(), StringName()); @@ -80,6 +82,7 @@ int NodePath::get_subname_count() const { return data->subpath.size(); } + StringName NodePath::get_subname(int p_idx) const { ERR_FAIL_COND_V(!data, StringName()); ERR_FAIL_INDEX_V(p_idx, data->subpath.size(), StringName()); @@ -133,6 +136,7 @@ bool NodePath::operator==(const NodePath &p_path) const { return true; } + bool NodePath::operator!=(const NodePath &p_path) const { return (!(*this == p_path)); } |