mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-13 02:52:37 +00:00
(svn r22551) -Fix: Remove BaseStorageArrays from _changed_storage_arrays on destruction.
This commit is contained in:
parent
86f931a065
commit
b2275b4093
@ -16,6 +16,14 @@
|
||||
/** The changed storage arrays */
|
||||
static std::set<BaseStorageArray*> _changed_storage_arrays;
|
||||
|
||||
/**
|
||||
* Remove references to use.
|
||||
*/
|
||||
BaseStorageArray::~BaseStorageArray()
|
||||
{
|
||||
_changed_storage_arrays.erase(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the changed storage array to the list of changed arrays.
|
||||
* This is done so we only have to revert/save the changed
|
||||
|
@ -20,8 +20,7 @@
|
||||
*/
|
||||
struct BaseStorageArray
|
||||
{
|
||||
/** The needed destructor */
|
||||
virtual ~BaseStorageArray() {}
|
||||
virtual ~BaseStorageArray();
|
||||
|
||||
/**
|
||||
* Clear the changes made since the last ClearChanges.
|
||||
|
Loading…
Reference in New Issue
Block a user