src/engine.h
branchnoai
changeset 9701 d1ac22c62f64
parent 9694 e72987579514
child 9723 eee46cb39750
equal deleted inserted replaced
9700:e442ce398e83 9701:d1ac22c62f64
   282 	GroupID group_id;
   282 	GroupID group_id;
   283 
   283 
   284 	EngineRenew(EngineID from = INVALID_ENGINE, EngineID to = INVALID_ENGINE) : from(from), to(to), next(NULL) {}
   284 	EngineRenew(EngineID from = INVALID_ENGINE, EngineID to = INVALID_ENGINE) : from(from), to(to), next(NULL) {}
   285 	~EngineRenew() { this->from = INVALID_ENGINE; }
   285 	~EngineRenew() { this->from = INVALID_ENGINE; }
   286 
   286 
   287 	bool IsValid() const { return this->from != INVALID_ENGINE; }
   287 	inline bool IsValid() const { return this->from != INVALID_ENGINE; }
   288 };
   288 };
   289 
   289 
   290 #define FOR_ALL_ENGINE_RENEWS_FROM(er, start) for (er = GetEngineRenew(start); er != NULL; er = (er->index + 1U < GetEngineRenewPoolSize()) ? GetEngineRenew(er->index + 1U) : NULL) if (er->IsValid())
   290 #define FOR_ALL_ENGINE_RENEWS_FROM(er, start) for (er = GetEngineRenew(start); er != NULL; er = (er->index + 1U < GetEngineRenewPoolSize()) ? GetEngineRenew(er->index + 1U) : NULL) if (er->IsValid())
   291 #define FOR_ALL_ENGINE_RENEWS(er) FOR_ALL_ENGINE_RENEWS_FROM(er, 0)
   291 #define FOR_ALL_ENGINE_RENEWS(er) FOR_ALL_ENGINE_RENEWS_FROM(er, 0)
   292 
   292