Skip to content

Commit 07fdd23

Browse files
Fix VARIANT_ENUM_CAST to support enum class
1 parent da26c17 commit 07fdd23

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/godot_cpp/core/binder_common.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ namespace godot {
5656
} \
5757
typedef int64_t EncodeT; \
5858
_FORCE_INLINE_ static void encode(m_enum p_val, void *p_ptr) { \
59-
*reinterpret_cast<int64_t *>(p_ptr) = p_val; \
59+
*reinterpret_cast<int64_t *>(p_ptr) = static_cast<int64_t>(p_val); \
6060
} \
6161
}; \
6262
}
@@ -77,7 +77,7 @@ namespace godot {
7777
} \
7878
typedef int64_t EncodeT; \
7979
_FORCE_INLINE_ static void encode(BitField<m_enum> p_val, void *p_ptr) { \
80-
*reinterpret_cast<int64_t *>(p_ptr) = p_val; \
80+
*reinterpret_cast<int64_t *>(p_ptr) = static_cast<int64_t>(p_val); \
8181
} \
8282
}; \
8383
}

0 commit comments

Comments
 (0)