File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4040
4141namespace godot {
4242
43- #define VARIANT_ENUM_CAST (m_enum ) \
44- namespace godot { \
45- MAKE_ENUM_TYPE_INFO (m_enum) \
46- template <> \
47- struct VariantCaster <m_enum> { \
48- static _FORCE_INLINE_ m_enum cast (const Variant &p_variant) { \
49- return (m_enum)p_variant.operator int64_t (); \
50- } \
51- }; \
52- template <> \
53- struct PtrToArg <m_enum> { \
54- _FORCE_INLINE_ static m_enum convert (const void *p_ptr) { \
55- return m_enum (*reinterpret_cast <const int64_t *>(p_ptr)); \
56- } \
57- typedef int64_t EncodeT; \
58- _FORCE_INLINE_ static void encode (m_enum p_val, void *p_ptr) { \
59- *reinterpret_cast <int64_t *>(p_ptr) = static_cast <int64_t >(p_val); \
60- } \
61- }; \
43+ #define VARIANT_ENUM_CAST (m_enum ) \
44+ namespace godot { \
45+ MAKE_ENUM_TYPE_INFO (m_enum) \
46+ template <> \
47+ struct VariantCaster <m_enum> { \
48+ static _FORCE_INLINE_ m_enum cast (const Variant &p_variant) { \
49+ return (m_enum)p_variant.operator int64_t (); \
50+ } \
51+ }; \
52+ template <> \
53+ struct PtrToArg <m_enum> { \
54+ _FORCE_INLINE_ static m_enum convert (const void *p_ptr) { \
55+ return m_enum (*reinterpret_cast <const int64_t *>(p_ptr)); \
56+ } \
57+ typedef int64_t EncodeT; \
58+ _FORCE_INLINE_ static void encode (m_enum p_val, void *p_ptr) { \
59+ *reinterpret_cast <int64_t *>(p_ptr) = static_cast <int64_t >(p_val); \
60+ } \
61+ }; \
6262 }
6363
6464#define VARIANT_BITFIELD_CAST (m_enum ) \
You can’t perform that action at this time.
0 commit comments