Browse Source

macro to cast one static instance to another class type. ATTENTION: no checks are done if the given class is really a parent of the instances class.

1.0.2
Georg Hopp 12 years ago
parent
commit
2534fb9e1d
  1. 2
      include/tr/class.h

2
include/tr/class.h

@ -138,6 +138,8 @@
{ __VA_ARGS__ } \ { __VA_ARGS__ } \
} }
#define TR_INSTANCE_CAST(class, name) ((class)&(_##name.data))
/** /**
* I initialize _ (the class's base or parent class) * I initialize _ (the class's base or parent class)
* with the identifier of that class. * with the identifier of that class.

Loading…
Cancel
Save