mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-09 16:09:15 +00:00
* tgu * btfo * Barsigns * tgui fixes * Map stuff * pubby morgue * . * ... * fixes varedited slime extract * Merge remote-tracking branch 'upstream/master' into january-tgu
12 lines
422 B
Plaintext
12 lines
422 B
Plaintext
/**
|
|
* NAMEOF: Compile time checked variable name to string conversion
|
|
* evaluates to a string equal to "X", but compile errors if X isn't a var on datum.
|
|
* datum may be null, but it does need to be a typed var.
|
|
**/
|
|
#define NAMEOF(datum, X) (#X || ##datum.##X)
|
|
|
|
/**
|
|
* NAMEOF that actually works in static definitions because src::type requires src to be defined
|
|
*/
|
|
#define NAMEOF_STATIC(datum, X) (nameof(type::##X))
|