Files
VOREStation/code/_helpers/nameof.dm
Selis 242fa3a66b Ports over configuration controller (#16484)
* Ports over configuration controller

* Fixes

* Manual path fix

* patch (#16490)

* patch

* .

* SQL Fix

* Post-rebase fix

* Added missing examples

---------

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
2024-10-22 19:26:44 +02:00

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))