File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ /* ----------------------------------------------------------------------------
2
+ ** Team Bear King
3
+ ** © 201x DigiPen Institute of Technology, All Rights Reserved.
4
+ **
5
+ ** MacroUtils.h
6
+ **
7
+ ** Author:
8
+ ** - Austin Brunkhorst - a.brunkhorst@digipen.edu
9
+ ** --------------------------------------------------------------------------*/
10
+
11
+ #pragma once
12
+
13
+ #define __STRINGIFY (x ) #x
14
+ #define STRINGIFY (x ) __STRINGIFY(x)
15
+
16
+ #define __WIDEN (x ) L ## x
17
+ #define WIDEN (x ) __WIDEN(x)
18
+
19
+ #define __MESSAGE (text ) __pragma( message(__FILE__ "(" STRINGIFY(__LINE__) ")" text) )
20
+
21
+ // Outputs a warning during compile time
22
+ #define URSINE_WARNING (text ) __MESSAGE( " : Warning: " ##text )
23
+
24
+ // Outputs an error during compile time
25
+ #define URSINE_ERROR (text ) __MESSAGE( " : Error: " ##text )
26
+
27
+ // Outputs a message during compile time
28
+ #define URSINE_MESSAGE (text ) __MESSAGE( ": " ##text )
29
+
30
+ #ifdef URSINE_TODO_AS_WARNINGS
31
+
32
+ // Outputs a TODO message during compile time
33
+ #define URSINE_TODO (text ) __MESSAGE( " : Warning: TODO: " ##text )
34
+
35
+ #else
36
+
37
+ // Outputs a TODO message during compile time
38
+ #define URSINE_TODO (text ) __MESSAGE( ": TODO: " ##text )
39
+
40
+ #endif
You can’t perform that action at this time.
0 commit comments