mirror of
https://github.com/thepigeongenerator/tetris_clone.git
synced 2025-12-17 14:05:45 +01:00
add macros for writing inline platform-specific expressions
This commit is contained in:
@@ -12,10 +12,14 @@
|
||||
# define PATH_SEP '\\' // contains the path separator as a character. Yes it is extremely annoying that this has to exist.
|
||||
# define PATH_SEP_STR "\\" // contains the path separator as a string, useful for concatenation. Yes it is extremely annoying that this has to exist.
|
||||
|
||||
# define unixonly(_exec) // (no-op) executes inline code when __unix__ is defined, otherwise is no-op
|
||||
# define winonly(_exec) _exec // executes inline code when _WIN32 is defined, otherwise is no-op
|
||||
#else
|
||||
# define PATH_SEP '/' // contains the path separator as a character. Yes it is extremely annoying that this has to exist.
|
||||
# define PATH_SEP_STR "/" // contains the path separator as a string, useful for concatenation. Yes it is extremely annoying that this has to exist.
|
||||
|
||||
# define unixonly(_exec) _exec // executes inline code when __unix__ is defined, otherwise is no-op
|
||||
# define winonly(_exec) // (no-op) executes inline code when _WIN32 is defined, otherwise is no-op
|
||||
#endif
|
||||
|
||||
// define the constants if they haven't been
|
||||
|
||||
Reference in New Issue
Block a user