diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-28 17:14:15 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-28 17:14:15 +0200 |
commit | 0ce7e2763d8f32de9cd1980dd6339264339c946b (patch) | |
tree | 7504297f8644fb0c3dcea8b2475557322a7e9f39 | |
parent | 4c5891186a60c6694f594fed04a411af6c8352d0 (diff) | |
parent | af814c1524426b4ad69dceb367eaef143d14763a (diff) |
Merge pull request #66539 from bruvzg/gdv_rename
Rename `script_instance` to `_script_instance` in the `GDVIRTUAL*` wrappers to avoid shadowing `Object` member.
-rw-r--r-- | core/object/make_virtuals.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/object/make_virtuals.py b/core/object/make_virtuals.py index c18d70d9f6..326a9277ff 100644 --- a/core/object/make_virtuals.py +++ b/core/object/make_virtuals.py @@ -5,11 +5,11 @@ mutable bool _gdvirtual_##m_name##_initialized = false;\\ mutable GDNativeExtensionClassCallVirtual _gdvirtual_##m_name = nullptr;\\ template<bool required>\\ _FORCE_INLINE_ bool _gdvirtual_##m_name##_call($CALLARGS) $CONST { \\ - ScriptInstance *script_instance = ((Object*)(this))->get_script_instance();\\ - if (script_instance) {\\ + ScriptInstance *_script_instance = ((Object*)(this))->get_script_instance();\\ + if (_script_instance) {\\ Callable::CallError ce; \\ $CALLSIARGS\\ - $CALLSIBEGINscript_instance->callp(_gdvirtual_##m_name##_sn, $CALLSIARGPASS, ce);\\ + $CALLSIBEGIN_script_instance->callp(_gdvirtual_##m_name##_sn, $CALLSIARGPASS, ce);\\ if (ce.error == Callable::CallError::CALL_OK) {\\ $CALLSIRET\\ return true;\\ @@ -35,9 +35,9 @@ _FORCE_INLINE_ bool _gdvirtual_##m_name##_call($CALLARGS) $CONST { \\ return false;\\ }\\ _FORCE_INLINE_ bool _gdvirtual_##m_name##_overridden() const { \\ - ScriptInstance *script_instance = ((Object*)(this))->get_script_instance();\\ - if (script_instance) {\\ - return script_instance->has_method(_gdvirtual_##m_name##_sn);\\ + ScriptInstance *_script_instance = ((Object*)(this))->get_script_instance();\\ + if (_script_instance) {\\ + return _script_instance->has_method(_gdvirtual_##m_name##_sn);\\ }\\ if (unlikely(_get_extension() && !_gdvirtual_##m_name##_initialized)) {\\ _gdvirtual_##m_name = (_get_extension() && _get_extension()->get_virtual) ? _get_extension()->get_virtual(_get_extension()->class_userdata, #m_name) : (GDNativeExtensionClassCallVirtual) nullptr;\\ |