Skip to content

Commit

Permalink
Fix invalid return from some _get/_set
Browse files Browse the repository at this point in the history
Invalidly returned `true` on the non-matched path
  • Loading branch information
AThousandShips committed Oct 27, 2023
1 parent dd74ffd commit b04cf84
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions scene/resources/bone_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ bool BoneMap::_set(const StringName &p_path, const Variant &p_value) {
set_skeleton_bone_name(which, p_value);
return true;
}
return true;
return false;
}

bool BoneMap::_get(const StringName &p_path, Variant &r_ret) const {
Expand All @@ -47,7 +47,7 @@ bool BoneMap::_get(const StringName &p_path, Variant &r_ret) const {
r_ret = get_skeleton_bone_name(which);
return true;
}
return true;
return false;
}

void BoneMap::_get_property_list(List<PropertyInfo> *p_list) const {
Expand Down
2 changes: 1 addition & 1 deletion scene/resources/mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1712,7 +1712,7 @@ bool ArrayMesh::_get(const StringName &p_name, Variant &r_ret) const {
return true;
}

return true;
return false;
}

void ArrayMesh::reset_state() {
Expand Down
4 changes: 2 additions & 2 deletions scene/resources/skeleton_modification_stack_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ bool SkeletonModificationStack2D::_set(const StringName &p_path, const Variant &
set_modification(mod_idx, p_value);
return true;
}
return true;
return false;
}

bool SkeletonModificationStack2D::_get(const StringName &p_path, Variant &r_ret) const {
Expand All @@ -60,7 +60,7 @@ bool SkeletonModificationStack2D::_get(const StringName &p_path, Variant &r_ret)
r_ret = get_modification(mod_idx);
return true;
}
return true;
return false;
}

void SkeletonModificationStack2D::setup() {
Expand Down

0 comments on commit b04cf84

Please sign in to comment.