diff --git a/include/godot_cpp/core/binder_common.hpp b/include/godot_cpp/core/binder_common.hpp index 61eb6a04d..6b7c6dd40 100644 --- a/include/godot_cpp/core/binder_common.hpp +++ b/include/godot_cpp/core/binder_common.hpp @@ -40,25 +40,25 @@ namespace godot { -#define VARIANT_ENUM_CAST(m_enum) \ - namespace godot { \ - MAKE_ENUM_TYPE_INFO(m_enum) \ - template <> \ - struct VariantCaster { \ - static _FORCE_INLINE_ m_enum cast(const Variant &p_variant) { \ - return (m_enum)p_variant.operator int64_t(); \ - } \ - }; \ - template <> \ - struct PtrToArg { \ - _FORCE_INLINE_ static m_enum convert(const void *p_ptr) { \ - return m_enum(*reinterpret_cast(p_ptr)); \ - } \ - typedef int64_t EncodeT; \ - _FORCE_INLINE_ static void encode(m_enum p_val, void *p_ptr) { \ - *reinterpret_cast(p_ptr) = p_val; \ - } \ - }; \ +#define VARIANT_ENUM_CAST(m_enum) \ + namespace godot { \ + MAKE_ENUM_TYPE_INFO(m_enum) \ + template <> \ + struct VariantCaster { \ + static _FORCE_INLINE_ m_enum cast(const Variant &p_variant) { \ + return (m_enum)p_variant.operator int64_t(); \ + } \ + }; \ + template <> \ + struct PtrToArg { \ + _FORCE_INLINE_ static m_enum convert(const void *p_ptr) { \ + return m_enum(*reinterpret_cast(p_ptr)); \ + } \ + typedef int64_t EncodeT; \ + _FORCE_INLINE_ static void encode(m_enum p_val, void *p_ptr) { \ + *reinterpret_cast(p_ptr) = static_cast(p_val); \ + } \ + }; \ } #define VARIANT_BITFIELD_CAST(m_enum) \ @@ -77,7 +77,7 @@ namespace godot { } \ typedef int64_t EncodeT; \ _FORCE_INLINE_ static void encode(BitField p_val, void *p_ptr) { \ - *reinterpret_cast(p_ptr) = p_val; \ + *reinterpret_cast(p_ptr) = static_cast(p_val); \ } \ }; \ }