wut/include/wut_types.h

25 lines
493 B
C
Raw Permalink Normal View History

2016-01-07 13:07:13 +01:00
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdalign.h>
2016-01-07 13:07:13 +01:00
typedef int32_t BOOL;
2016-01-07 13:07:13 +01:00
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#if __cplusplus >= 201402L
#define WUT_ENUM_BITMASK_TYPE(_type) \
extern "C++" { static constexpr inline _type operator|(_type lhs, _type rhs) { \
return static_cast<_type>(static_cast<uint32_t>(lhs) | static_cast<uint32_t>(rhs)); \
} }
#else
#define WUT_ENUM_BITMASK_TYPE(_type)
#endif