Files @ r12458:1218346ee511
Branch filter:

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

translators
(svn r16903) -Update from WebTranslator v3.0:
simplified_chinese - 2 changes by Gavin
danish - 5 changes by Bjarni
dutch - 1 changes by habell
finnish - 17 changes by jpx_
hungarian - 1 changes by alyr
italian - 1 changes by lorenzodv
korean - 1 changes by darkttd
russian - 15 changes by Lone_Wolf
serbian - 90 changes by BlueEyedFiend
welsh - 24 changes by welshdragon
/* $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();
}