Files @ r11784:1f7706fe8337
Branch filter:

Location: cpp/openttd-patchpack/source/src/newgrf_storage.cpp

translators
(svn r16179) -Update: WebTranslator2 update to 2009-04-27 17:41:22
brazilian_portuguese - 24 fixed by tucalipe (24)
dutch - 10 fixed by habell (10)
estonian - 8 changed by kristjans (8)
hungarian - 10 fixed by IPG (10)
italian - 1 changed by lorenzodv (1)
malay - 22 fixed by Syed (22)
norwegian_bokmal - 1 fixed by khh (1)
polish - 336 fixed, 104 changed by konrad (440)
/* $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();
}