From b04cf8486d5e504976045429ae2e04882bcd62dc Mon Sep 17 00:00:00 2001 From: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Date: Fri, 27 Oct 2023 15:07:42 +0200 Subject: [PATCH] Fix invalid return from some `_get/_set` Invalidly returned `true` on the non-matched path --- scene/resources/bone_map.cpp | 4 ++-- scene/resources/mesh.cpp | 2 +- scene/resources/skeleton_modification_stack_2d.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scene/resources/bone_map.cpp b/scene/resources/bone_map.cpp index 759d189bfa6..5363b8ec79c 100644 --- a/scene/resources/bone_map.cpp +++ b/scene/resources/bone_map.cpp @@ -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 { @@ -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 *p_list) const { diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp index 25a65b5cc4e..a0cdbfa16cc 100644 --- a/scene/resources/mesh.cpp +++ b/scene/resources/mesh.cpp @@ -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() { diff --git a/scene/resources/skeleton_modification_stack_2d.cpp b/scene/resources/skeleton_modification_stack_2d.cpp index 71ddbc0898c..5703185374e 100644 --- a/scene/resources/skeleton_modification_stack_2d.cpp +++ b/scene/resources/skeleton_modification_stack_2d.cpp @@ -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 { @@ -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() {