diff options
author | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-07-19 14:33:34 +1000 |
---|---|---|
committer | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-07-19 14:33:34 +1000 |
commit | 82515f9d90ac149984013f0d64c1cab37b349b29 (patch) | |
tree | 6da445874d055e3e66ab1825d4aa3bb784955fc9 /src/defines.h | |
parent | 5359c011a08ef2e06ed54104cc16c32868ca88ff (diff) |
chore clang format + tidy
Diffstat (limited to 'src/defines.h')
-rw-r--r-- | src/defines.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/defines.h b/src/defines.h index a16d68e..689eeca 100644 --- a/src/defines.h +++ b/src/defines.h @@ -42,6 +42,8 @@ _Static_assert(sizeof(ptrdiff_t) == 8, "type ptrdiff_t should be 8 bytes"); #define alignof(x) _Alignof(x) +#define threadlocal _Thread_local + // Wrap a u32 to make a type-safe "handle" or ID #define CORE_DEFINE_HANDLE(name) \ typedef struct name name; \ @@ -49,13 +51,14 @@ _Static_assert(sizeof(ptrdiff_t) == 8, "type ptrdiff_t should be 8 bytes"); u32 raw; \ } -CORE_DEFINE_HANDLE(Handle); // Untyped handle that can be casted to a strongly typed resource handle +CORE_DEFINE_HANDLE( + Handle); // Untyped handle that can be casted to a strongly typed resource handle -#define PUB // For collecting public APIs to expose in an amalgamation header file +#define PUB // For collecting public APIs to expose in an amalgamation header file -#define KB(x) ((size_t) x * 1000) -#define MB(x) ((size_t) x * 1000 * 1000) -#define GB(x) ((size_t) x * 1000 * 1000 * 1000) +#define KB(x) ((size_t)x * 1000) +#define MB(x) ((size_t)x * 1000 * 1000) +#define GB(x) ((size_t)x * 1000 * 1000 * 1000) // NOTE: The below is now handled in xmake.lua // Platform will inform renderer backend (unless user overrides) |