diff options
Diffstat (limited to 'context.h')
-rw-r--r-- | context.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -142,6 +142,8 @@ typedef long ptrdiff_t; PRIVATE_MEMBER_GETTER_FUNC(ret_type, name, __VA_ARGS__); \ PRIVATE_MEMBER_SETTER_FUNC(ret_type, name, __VA_ARGS__) +#define as(type, var) reinterpret_cast<type>(var) + // pso/TMainTask.h #define X_OR_Y_CHILD(flags, old_flags, one_prefix, zero_prefix, suffix) \ if (flags != old_flags) { \ @@ -837,8 +839,8 @@ public: TPlySmth() {}; void bswap() { - bswap_32(reinterpret_cast<u32 *>(&m_smth)); - bswap_32(reinterpret_cast<u32 *>(&m_smth1)); + bswap_32(as(u32 *, &m_smth)); + bswap_32(as(u32 *, &m_smth1)); }; public: u8 m_smth[4]; |