Fixes
This commit is contained in:
@ -19,13 +19,14 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <new>
|
||||
#include <cstddef>
|
||||
#include <concepts>
|
||||
#include <functional>
|
||||
#include <assert.h>
|
||||
#include <type_traits>
|
||||
#include <concepts>
|
||||
#include <cstddef>
|
||||
#include <functional>
|
||||
#include <initializer_list>
|
||||
#include <new>
|
||||
#include <sstream>
|
||||
#include <type_traits>
|
||||
|
||||
#define IAC_SEC_LEVEL(v) (IACORE_SECURITY_LEVEL >= v)
|
||||
|
||||
@ -47,15 +48,15 @@
|
||||
#define DEBUG_ONLY(f)
|
||||
#endif
|
||||
|
||||
#define AUTO auto
|
||||
#define CONST const
|
||||
#define STATIC static
|
||||
#define EXTERN extern
|
||||
#define VIRTUAL virtual
|
||||
#define OVERRIDE override
|
||||
#define AUTO auto
|
||||
#define CONST const
|
||||
#define STATIC static
|
||||
#define EXTERN extern
|
||||
#define VIRTUAL virtual
|
||||
#define OVERRIDE override
|
||||
#define CONSTEXPR constexpr
|
||||
#define NOEXCEPT noexcept
|
||||
#define NORETURN [[noreturn]]
|
||||
#define NOEXCEPT noexcept
|
||||
#define NORETURN [[noreturn]]
|
||||
|
||||
#define IA_MOVE(...) std::move(__VA_ARGS__)
|
||||
|
||||
@ -66,16 +67,16 @@
|
||||
|
||||
#define INLINE inline
|
||||
#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)
|
||||
#define ALWAYS_INLINE __attribute__((always_inline)) inline
|
||||
#define ALWAYS_INLINE __attribute__((always_inline)) inline
|
||||
#elif defined(_MSC_VER)
|
||||
#define ALWAYS_INLINE __forceinline
|
||||
#define ALWAYS_INLINE __forceinline
|
||||
#endif
|
||||
|
||||
#define UNUSED(v) ((void)v);
|
||||
#define UNUSED(v) ((void) v);
|
||||
|
||||
#define NO_DISCARD(s) [[nodiscard(s)]]
|
||||
|
||||
#define B_LIKELY(cond) (cond) [[likely]]
|
||||
#define B_LIKELY(cond) (cond) [[likely]]
|
||||
#define B_UNLIKELY(cond) (cond) [[unlikely]]
|
||||
|
||||
#define __INTERNAL_IA_STRINGIFY(value) #value
|
||||
@ -99,7 +100,7 @@
|
||||
#undef TRUE
|
||||
#undef FALSE
|
||||
#define FALSE false
|
||||
#define TRUE true
|
||||
#define TRUE true
|
||||
|
||||
#define IN
|
||||
#define OUT
|
||||
@ -110,21 +111,22 @@
|
||||
|
||||
#define C_DECL(f) EXTERN "C" f
|
||||
|
||||
#define CAST(v, t) ((t)v)
|
||||
#define CAST(v, t) ((t) v)
|
||||
|
||||
#define ALIAS_FUNCTION(alias, function) template <typename... Args> \
|
||||
auto alias(Args&&... args) -> decltype(f(std::forward<Args>(args)...)) \
|
||||
{ \
|
||||
return function(std::forward<Args>(args)...); \
|
||||
}
|
||||
#define ALIAS_FUNCTION(alias, function) \
|
||||
template<typename... Args> auto alias(Args &&...args) -> decltype(f(std::forward<Args>(args)...)) \
|
||||
{ \
|
||||
return function(std::forward<Args>(args)...); \
|
||||
}
|
||||
|
||||
#define ALIAS_TEMPLATE_FUNCTION(t, alias, function) template <typename t, typename... Args> \
|
||||
auto alias(Args&&... args) -> decltype(function<t>(std::forward<Args>(args)...)) \
|
||||
{ \
|
||||
return function<t>(std::forward<Args>(args)...); \
|
||||
}
|
||||
#define ALIAS_TEMPLATE_FUNCTION(t, alias, function) \
|
||||
template<typename t, typename... Args> \
|
||||
auto alias(Args &&...args) -> decltype(function<t>(std::forward<Args>(args)...)) \
|
||||
{ \
|
||||
return function<t>(std::forward<Args>(args)...); \
|
||||
}
|
||||
|
||||
#define IA_RELEASE_ASSERT(v) assert((v))
|
||||
#define IA_RELEASE_ASSERT(v) assert((v))
|
||||
#define IA_RELEASE_ASSERT_MSG(v, m) assert((v) && m)
|
||||
|
||||
#if defined(__DEBUG_MODE__)
|
||||
@ -138,8 +140,8 @@
|
||||
#define IA_ASSERT_EQ(a, b) IA_ASSERT((a) == (b))
|
||||
#define IA_ASSERT_GE(a, b) IA_ASSERT((a) >= (b))
|
||||
#define IA_ASSERT_LE(a, b) IA_ASSERT(a <= b)
|
||||
#define IA_ASSERT_LT(a, b) IA_ASSERT(a < b)
|
||||
#define IA_ASSERT_GT(a, b) IA_ASSERT(a > b)
|
||||
#define IA_ASSERT_LT(a, b) IA_ASSERT(a < b)
|
||||
#define IA_ASSERT_GT(a, b) IA_ASSERT(a > b)
|
||||
#define IA_ASSERT_IMPLIES(a, b) IA_ASSERT(!(a) || (b))
|
||||
#define IA_ASSERT_NOT_NULL(v) IA_ASSERT(((v) != nullptr))
|
||||
|
||||
@ -150,26 +152,37 @@
|
||||
#define IA_MAX_STRING_LENGTH (IA_MAX_POSSIBLE_SIZE >> 8)
|
||||
|
||||
#define IA_VERSION_TYPE UINT64
|
||||
#define IA_MAKE_VERSION(major, minor, patch) ((static_cast<UINT64>(major) & 0xFFFFFF) << 40) | ((static_cast<UINT64>(minor) & 0xFFFFFF) << 16) | (static_cast<UINT64>(patch) & 0xFFFF)
|
||||
#define IA_STRINGIFY_VERSION(version) BuildString("v", (version >> 40) & 0xFFFFFF, ".", (version >> 16) & 0xFFFFFF, ".", version & 0xFFFF)
|
||||
#define IA_MAKE_VERSION(major, minor, patch) \
|
||||
((static_cast<UINT64>(major) & 0xFFFFFF) << 40) | ((static_cast<UINT64>(minor) & 0xFFFFFF) << 16) | \
|
||||
(static_cast<UINT64>(patch) & 0xFFFF)
|
||||
#define IA_STRINGIFY_VERSION(version) \
|
||||
BuildString("v", (version >> 40) & 0xFFFFFF, ".", (version >> 16) & 0xFFFFFF, ".", version & 0xFFFF)
|
||||
#define IA_PARSE_VERSION_STRING(versionString) \
|
||||
[](IN std::string str) { \
|
||||
INT32 minor, major, patch; \
|
||||
char dot; \
|
||||
std::stringstream ss(str); \
|
||||
ss >> major >> dot >> minor >> dot >> patch; \
|
||||
return IA_MAKE_VERSION(major, minor, patch); \
|
||||
}(versionString)
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#define IA_DLL_EXPORT __declspec(dllexport)
|
||||
#define IA_DLL_IMPORT __declspec(dllimport)
|
||||
#define IA_DLL_EXPORT __declspec(dllexport)
|
||||
#define IA_DLL_IMPORT __declspec(dllimport)
|
||||
#elif defined(__GNUC__)
|
||||
#define IA_DLL_EXPORT __attribute__((visibility("default")))
|
||||
#define IA_DLL_IMPORT
|
||||
#define IA_DLL_EXPORT __attribute__((visibility("default")))
|
||||
#define IA_DLL_IMPORT
|
||||
#else
|
||||
#define IA_DLL_EXPORT
|
||||
#define IA_DLL_IMPORT
|
||||
#define IA_DLL_EXPORT
|
||||
#define IA_DLL_IMPORT
|
||||
#endif
|
||||
|
||||
#define __CC_BLACK "\033[30m"
|
||||
#define __CC_RED "\033[31m"
|
||||
#define __CC_GREEN "\033[32m"
|
||||
#define __CC_YELLOW "\033[33m"
|
||||
#define __CC_BLUE "\033[34m"
|
||||
#define __CC_BLACK "\033[30m"
|
||||
#define __CC_RED "\033[31m"
|
||||
#define __CC_GREEN "\033[32m"
|
||||
#define __CC_YELLOW "\033[33m"
|
||||
#define __CC_BLUE "\033[34m"
|
||||
#define __CC_MAGENTA "\033[35m"
|
||||
#define __CC_CYAN "\033[36m"
|
||||
#define __CC_WHITE "\033[37m"
|
||||
#define __CC_CYAN "\033[36m"
|
||||
#define __CC_WHITE "\033[37m"
|
||||
#define __CC_DEFAULT "\033[39m"
|
||||
|
||||
Reference in New Issue
Block a user