Aether3D Game Engine
Macros.hpp
1 #ifndef MACROS_H
2 #define MACROS_H
3 
4 #if (defined( _MSC_VER ) && (_MSC_VER >= 1900)) || defined(__APPLE__) || defined(__GNUC__)
5 #define ALIGNAS( n ) alignas( n )
6 #else
7 #define ALIGNAS( n ) __declspec( align( n ) )
8 #endif
9 
10 #define AE3D_SAFE_RELEASE(x) if (x) { x->Release(); x = nullptr; }
11 #define AE3D_CHECK_D3D(x, msg) if (x != S_OK) { ae3d::System::Assert( false, msg ); }
12 #define AE3D_CHECK_VULKAN(x, msg) if (x != VK_SUCCESS) { ae3d::System::Assert( false, msg ); }
13 
14 #endif