src/newgrf_storage.cpp
author translators
Fri, 05 Dec 2008 18:45:05 +0000
changeset 10406 a929a9e55ce9
parent 8130 d2eb7d04f6e1
permissions -rw-r--r--
(svn r14657) -Update: WebTranslator2 update to 2008-12-05 18:44:56
afrikaans - 5 fixed by burgerd (5)
icelandic - 13 fixed by scrooge (13)
latvian - 101 fixed by Wersoo (101)
lithuanian - 4 fixed, 293 changed by linasmi (297)
malay - 40 fixed by Syed (40)
slovenian - 11 fixed by Necrolyte (11)
turkish - 78 fixed by Emin (78)
/* $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();
}