summaryrefslogtreecommitdiffstats
path: root/core/variant/binder_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/variant/binder_common.h')
-rw-r--r--core/variant/binder_common.h26
1 files changed, 1 insertions, 25 deletions
diff --git a/core/variant/binder_common.h b/core/variant/binder_common.h
index 2e38ce5b06..e950709526 100644
--- a/core/variant/binder_common.h
+++ b/core/variant/binder_common.h
@@ -63,8 +63,6 @@ struct VariantCaster<const T &> {
}
};
-#ifdef PTRCALL_ENABLED
-
#define VARIANT_ENUM_CAST(m_enum) \
MAKE_ENUM_TYPE_INFO(m_enum) \
template <> \
@@ -83,19 +81,6 @@ struct VariantCaster<const T &> {
} \
};
-#else
-
-#define VARIANT_ENUM_CAST(m_enum) \
- MAKE_ENUM_TYPE_INFO(m_enum) \
- template <> \
- struct VariantCaster<m_enum> { \
- static _FORCE_INLINE_ m_enum cast(const Variant &p_variant) { \
- return (m_enum)p_variant.operator int(); \
- } \
- };
-
-#endif
-
// Object enum casts must go here
VARIANT_ENUM_CAST(Object::ConnectFlags);
@@ -118,7 +103,7 @@ struct VariantCaster<char32_t> {
return (char32_t)p_variant.operator int();
}
};
-#ifdef PTRCALL_ENABLED
+
template <>
struct PtrToArg<char32_t> {
_FORCE_INLINE_ static char32_t convert(const void *p_ptr) {
@@ -128,7 +113,6 @@ struct PtrToArg<char32_t> {
*(int *)p_ptr = p_val;
}
};
-#endif
template <typename T>
struct VariantObjectClassChecker {
@@ -228,8 +212,6 @@ void call_with_variant_argsc_helper(T *p_instance, void (T::*p_method)(P...) con
(void)(p_args); //avoid warning
}
-#ifdef PTRCALL_ENABLED
-
template <class T, class... P, size_t... Is>
void call_with_ptr_args_helper(T *p_instance, void (T::*p_method)(P...), const void **p_args, IndexSequence<Is...>) {
(p_instance->*p_method)(PtrToArg<P>::convert(p_args[Is])...);
@@ -255,8 +237,6 @@ void call_with_ptr_args_static_retc_helper(T *p_instance, R (*p_method)(T *, P..
PtrToArg<R>::encode(p_method(p_instance, PtrToArg<P>::convert(p_args[Is])...), r_ret);
}
-#endif // PTRCALL_ENABLED
-
template <class T, class... P, size_t... Is>
void call_with_validated_variant_args_helper(T *p_instance, void (T::*p_method)(P...), const Variant **p_args, IndexSequence<Is...>) {
(p_instance->*p_method)((VariantInternalAccessor<typename GetSimpleTypeT<P>::type_t>::get(p_args[Is]))...);
@@ -450,8 +430,6 @@ void call_with_variant_args_retc_dv(T *p_instance, R (T::*p_method)(P...) const,
call_with_variant_args_retc_helper(p_instance, p_method, args, r_ret, r_error, BuildIndexSequence<sizeof...(P)>{});
}
-#ifdef PTRCALL_ENABLED
-
template <class T, class... P>
void call_with_ptr_args(T *p_instance, void (T::*p_method)(P...), const void **p_args) {
call_with_ptr_args_helper<T, P...>(p_instance, p_method, p_args, BuildIndexSequence<sizeof...(P)>{});
@@ -477,8 +455,6 @@ void call_with_ptr_args_static_retc(T *p_instance, R (*p_method)(T *, P...), con
call_with_ptr_args_static_retc_helper<T, R, P...>(p_instance, p_method, p_args, r_ret, BuildIndexSequence<sizeof...(P)>{});
}
-#endif // PTRCALL_ENABLED
-
template <class T, class... P>
void call_with_validated_variant_args(Variant *base, void (T::*p_method)(P...), const Variant **p_args) {
call_with_validated_variant_args_helper<T, P...>(VariantGetInternalPtr<T>::get_ptr(base), p_method, p_args, BuildIndexSequence<sizeof...(P)>{});