11#pragma once
2+ #include < cstdint>
23#include < EABase/eabase.h>
34#include < EASTL/internal/config.h>
4- #include < cstdint>
55
66using THash32 = uint32_t ;
77
88// clang-format off
99
1010#define SIDENT (x ) x
11- #define STRINGIFY (x ) _STRINGIFY2(x) /* #x */
12- #define _STRINGIFY2 (x ) #x
11+ #ifndef STRINGIFY
12+ # define STRINGIFY (x ) _STRINGIFY2(x) /* #x */
13+ # define _STRINGIFY2 (x ) #x
14+ #endif
1315#define CON (a, b ) a##b
1416#define PASTE (a, b ) CON(a, b)
1517
@@ -34,26 +36,27 @@ using THash32 = uint32_t;
3436// dummy place to set breakpoint if needed
3537#define BPT () [](){return 0 ;}();
3638
37- template < typename T> T c_def (T v) { return v; }
38- template < typename T> constexpr inline T c_expr (T value) { return value; }
39+ # define MAKE4C ( a, b, c, d ) ((a) | ((b) << 8 ) | ((c) << 16 ) | ((d) << 24 ))
40+ # define _MAKE4C ( s ) MAKE4C(s[ 0 ], s[ 1 ], s[ 2 ], s[ 3 ])
3941
4042
41- EA_DISABLE_VC_WARNING (4100 ) // unreferenced formal parameter
42- template<typename... T> inline void unused(T&&... x) { (void (sizeof ...(x))); }
43- #define G_UNUSED (...) unused(__VA_ARGS__)
44- EA_RESTORE_VC_WARNING ()
43+ namespace qd {
4544
45+ static constexpr uint32_t _noPos = UINT32_MAX; // ~0u
4646
47- #define MAKE4C (a, b, c, d ) ((a) | ((b) << 8 ) | ((c) << 16 ) | ((d) << 24 ))
48- #define _MAKE4C (s ) MAKE4C(s[0 ], s[1 ], s[2 ], s[3 ])
47+ inline constexpr uint32_t fourcc (const char s[4 ]) {
48+ return MAKE4C (s[0 ], s[1 ], s[2 ], s[3 ]);
49+ }
50+
51+ template <typename T> T c_def (T v) { return v; }
52+ template <typename T> constexpr inline T c_expr (T value) { return value; }
4953
5054
51- namespace qd {
52- static constexpr uint32_t _noPos = UINT32_MAX; // ~0u
55+ EA_DISABLE_VC_WARNING (4100 ) // unreferenced formal parameter
56+ template <typename ... T> inline void unused (T&&... x) { (void (sizeof ...(x))); }
57+ #define G_UNUSED (...) qd::unused(__VA_ARGS__)
58+ EA_RESTORE_VC_WARNING ()
5359
54- inline constexpr uint32_t fourcc (const char s[4 ]) {
55- return MAKE4C (s[0 ], s[1 ], s[2 ], s[3 ]);
56- }
5760}; // namespace qd
5861
5962
0 commit comments