HandmadeHero/project/platform/macros.h

17 lines
497 B
C
Raw Normal View History

#pragma once
2023-09-08 18:08:57 -07:00
// Keywords
#define global static // Global variables
#define internal static // Internal linkage
#define local_persist static // Local Persisting variables
2023-09-08 21:01:53 -07:00
#define api_c extern "C"
// Casting
#define ccast( Type, Value ) ( * const_cast< Type* >( & (Value) ) )
#define pcast( Type, Value ) ( * reinterpret_cast< Type* >( & ( Value ) ) )
#define rcast( Type, Value ) reinterpret_cast< Type >( Value )
#define scast( Type, Value ) static_cast< Type >( Value )