newgrf_storage.cpp

Go to the documentation of this file.
00001 /* $Id: newgrf_storage.cpp 11691 2007-12-25 09:48:53Z rubidium $ */
00002 
00005 #include "stdafx.h"
00006 #include "newgrf_storage.h"
00007 #include <set>
00008 
00010 static std::set<BaseStorageArray*> _changed_storage_arrays;
00011 
00012 void AddChangedStorage(BaseStorageArray *storage)
00013 {
00014   _changed_storage_arrays.insert(storage);
00015 }
00016 
00017 void ClearStorageChanges(bool keep_changes)
00018 {
00019   /* Loop over all changes arrays */
00020   for (std::set<BaseStorageArray*>::iterator it = _changed_storage_arrays.begin(); it != _changed_storage_arrays.end(); it++) {
00021     (*it)->ClearChanges(keep_changes);
00022   }
00023 
00024   /* And then clear that array */
00025   _changed_storage_arrays.clear();
00026 }

Generated on Sun Mar 15 22:49:48 2009 for openttd by  doxygen 1.5.6