Skip to content

Commit 904c2f4

Browse files
committed
Make sure _get and _set dispatch up the class hierarchy
1 parent f2b521f commit 904c2f4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

include/godot_cpp/classes/wrapped.hpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,9 @@ public:
277277
if (p_instance && m_class::_get_set()) { \
278278
if (m_class::_get_set() != m_inherits::_get_set()) { \
279279
m_class *cls = reinterpret_cast<m_class *>(p_instance); \
280-
return cls->_set(*reinterpret_cast<const ::godot::StringName *>(p_name), *reinterpret_cast<const ::godot::Variant *>(p_value)); \
280+
if (cls->_set(*reinterpret_cast<const ::godot::StringName *>(p_name), *reinterpret_cast<const ::godot::Variant *>(p_value))) { \
281+
return true; \
282+
} \
281283
} \
282284
return m_inherits::set_bind(p_instance, p_name, p_value); \
283285
} \
@@ -288,7 +290,9 @@ public:
288290
if (p_instance && m_class::_get_get()) { \
289291
if (m_class::_get_get() != m_inherits::_get_get()) { \
290292
m_class *cls = reinterpret_cast<m_class *>(p_instance); \
291-
return cls->_get(*reinterpret_cast<const ::godot::StringName *>(p_name), *reinterpret_cast<::godot::Variant *>(r_ret)); \
293+
if (cls->_get(*reinterpret_cast<const ::godot::StringName *>(p_name), *reinterpret_cast<::godot::Variant *>(r_ret))) { \
294+
return true; \
295+
} \
292296
} \
293297
return m_inherits::get_bind(p_instance, p_name, r_ret); \
294298
} \

0 commit comments

Comments
 (0)