summaryrefslogtreecommitdiff
path: root/src/newgrf_storage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/newgrf_storage.cpp')
-rw-r--r--src/newgrf_storage.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/newgrf_storage.cpp b/src/newgrf_storage.cpp
index a4c26403d..535a9f8fb 100644
--- a/src/newgrf_storage.cpp
+++ b/src/newgrf_storage.cpp
@@ -18,14 +18,14 @@ PersistentStoragePool _persistent_storage_pool("PersistentStorage");
INSTANTIATE_POOL_METHODS(PersistentStorage)
/** The changed storage arrays */
-static std::set<BaseStorageArray*> _changed_storage_arrays;
+static std::set<BaseStorageArray*> *_changed_storage_arrays = new std::set<BaseStorageArray*>;
/**
* Remove references to use.
*/
BaseStorageArray::~BaseStorageArray()
{
- _changed_storage_arrays.erase(this);
+ _changed_storage_arrays->erase(this);
}
/**
@@ -36,7 +36,7 @@ BaseStorageArray::~BaseStorageArray()
*/
void AddChangedStorage(BaseStorageArray *storage)
{
- _changed_storage_arrays.insert(storage);
+ _changed_storage_arrays->insert(storage);
}
/**
@@ -52,10 +52,10 @@ void AddChangedStorage(BaseStorageArray *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++) {
+ 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();
+ _changed_storage_arrays->clear();
}