StaticInitializerOrder.cpp 406 B

123456789101112131415161718
  1. #define _REGISTRY
  2. #include "Registries.h"
  3. int count_WorldUpdateType = 0;
  4. #undef REGISTER
  5. #define REGISTER(c, typ) \
  6. const int c::ID = count_##typ++; \
  7. const c *c::INSTANCE = new c();
  8. // order of includes determines the ids
  9. // world updates
  10. #include "PlaceBlockUpdate.h"
  11. #include "BlockRemovedUpdate.h"
  12. #include "AddEntityUpdate.h"
  13. #include "EntityRemovedUpdate.h"