src/newgrf_storage.cpp
author translators
Tue, 09 Dec 2008 18:44:51 +0000
changeset 10412 3e8639ed3eba
parent 8130 d2eb7d04f6e1
permissions -rw-r--r--
(svn r14665) -Update: WebTranslator2 update to 2008-12-09 18:44:40
arabic_egypt - 301 fixed by khaloofah (301)
esperanto - 64 fixed, 2 changed by alekcxjo (66)
hebrew - 430 fixed by moshe (430)
hungarian - 10 changed by alyr (9), oklmernok (1)
indonesian - 49 fixed, 4 changed by fanioz (40), anansboga (13)
lithuanian - 5 fixed by Enternald (5)
portuguese - 6 fixed by SnowFlake (6)
thai - 333 fixed by vetbook (333)
/* $Id$ */

/** @file newgrf_storage.cpp Functionality related to the temporary and persistent storage arrays for NewGRFs. */

#include "stdafx.h"
#include "newgrf_storage.h"
#include <set>

/** The changed storage arrays */
static std::set<BaseStorageArray*> _changed_storage_arrays;

void AddChangedStorage(BaseStorageArray *storage)
{
	_changed_storage_arrays.insert(storage);
}

void ClearStorageChanges(bool keep_changes)
{
	/* Loop over all changes arrays */
	for (std::set<BaseStorageArray*>::iterator it = _changed_storage_arrays.begin(); it != _changed_storage_arrays.end(); it++) {
		(*it)->ClearChanges(keep_changes);
	}

	/* And then clear that array */
	_changed_storage_arrays.clear();
}