diff --git a/projs/shadow/shadow-engine/platforms/inc/shadow/platform/Common.h b/projs/shadow/shadow-engine/platforms/inc/shadow/platform/Common.h new file mode 100644 index 00000000..3414399d --- /dev/null +++ b/projs/shadow/shadow-engine/platforms/inc/shadow/platform/Common.h @@ -0,0 +1,22 @@ +#pragma once + +#ifdef __linux__ +#define ifsystem(linux,windows,apple) linux +#elif __WIN32 +#define ifsystem(linux,windows,apple) windows +#elif __APPLE__ +#define ifsystem(linux,windows,apple) apple +#endif + +// Clang on macOS has __GNUC__ defined to 4, for some reason. +#ifdef __clang__ +#define ifcompiler(gcc,clang,msvc) clang +#elif __GNUC__ +#define ifcompiler(gcc,clang,msvc) gcc +#elif _MSC_VER +#define ifcompiler(gcc,clang,msvc) msvc +#endif + +template constexpr uint32_t lengthOf(const T (&)[count]) { + return count; +}; \ No newline at end of file