Codechange: Replace FOR_ALL_ENGINES with range-based for loops

This commit is contained in:
glx
2019-12-15 22:45:18 +01:00
committed by Niels Martin Hansen
parent 1c92ba8ebe
commit 1f6b3a37f9
16 changed files with 50 additions and 81 deletions

View File

@@ -86,8 +86,7 @@ Engine *GetTempDataEngine(EngineID index)
static void Save_ENGN()
{
Engine *e;
FOR_ALL_ENGINES(e) {
for (Engine *e : Engine::Iterate()) {
SlSetArrayIndex(e->index);
SlObject(e, _engine_desc);
}
@@ -118,8 +117,7 @@ static void Load_ENGN()
*/
void CopyTempEngineData()
{
Engine *e;
FOR_ALL_ENGINES(e) {
for (Engine *e : Engine::Iterate()) {
if (e->index >= _temp_engine.size()) break;
const Engine *se = GetTempDataEngine(e->index);