Commit 2534fb9e1d3135a5919838e72a120254f9926f9b

Authored by Georg Hopp
1 parent 93b6d720

macro to cast one static instance to another class type. ATTENTION: no checks ar…

…e done if the given class is really a parent of the instances class.
Showing 1 changed file with 2 additions and 0 deletions
... ... @@ -138,6 +138,8 @@
138 138 { __VA_ARGS__ } \
139 139 }
140 140
  141 +#define TR_INSTANCE_CAST(class, name) ((class)&(_##name.data))
  142 +
141 143 /**
142 144 * I initialize _ (the class's base or parent class)
143 145 * with the identifier of that class.
... ...
Please register or login to post a comment