You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-22 15:06:45 +00:00
Replace size() == 0 with is_empty().
This commit is contained in:
@@ -350,7 +350,7 @@ void NodePath::simplify() {
|
||||
data->path.remove_at(i - 1);
|
||||
data->path.remove_at(i - 1);
|
||||
i -= 2;
|
||||
if (data->path.size() == 0) {
|
||||
if (data->path.is_empty()) {
|
||||
data->path.push_back(".");
|
||||
break;
|
||||
}
|
||||
@@ -366,7 +366,7 @@ NodePath NodePath::simplified() const {
|
||||
}
|
||||
|
||||
NodePath::NodePath(const Vector<StringName> &p_path, bool p_absolute) {
|
||||
if (p_path.size() == 0 && !p_absolute) {
|
||||
if (p_path.is_empty() && !p_absolute) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -378,7 +378,7 @@ NodePath::NodePath(const Vector<StringName> &p_path, bool p_absolute) {
|
||||
}
|
||||
|
||||
NodePath::NodePath(const Vector<StringName> &p_path, const Vector<StringName> &p_subpath, bool p_absolute) {
|
||||
if (p_path.size() == 0 && p_subpath.size() == 0 && !p_absolute) {
|
||||
if (p_path.is_empty() && p_subpath.is_empty() && !p_absolute) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user