Mercurial > hg > openttd
view src/newgrf_storage.cpp @ 9396:bbf7586724f4 draft
(svn r13307) -Codechange: Separate VehicleList and its two functions so only the 3 users include it, reducing dependencies on misc/smallvec.h
author | peter1138 <peter1138@openttd.org> |
---|---|
date | Wed, 28 May 2008 11:56:21 +0000 |
parents | 0586823afe39 |
children | bc7926153e19 |
line wrap: on
line source
/* $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(); }