mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r22551) -Fix: Remove BaseStorageArrays from _changed_storage_arrays on destruction.
This commit is contained in:
parent
b306a3e4a9
commit
e8a381659c
@ -16,6 +16,14 @@
|
|||||||
/** The changed storage arrays */
|
/** The changed storage arrays */
|
||||||
static std::set<BaseStorageArray*> _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.
|
* Add the changed storage array to the list of changed arrays.
|
||||||
* This is done so we only have to revert/save the changed
|
* This is done so we only have to revert/save the changed
|
||||||
|
@ -20,8 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
struct BaseStorageArray
|
struct BaseStorageArray
|
||||||
{
|
{
|
||||||
/** The needed destructor */
|
virtual ~BaseStorageArray();
|
||||||
virtual ~BaseStorageArray() {}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clear the changes made since the last ClearChanges.
|
* Clear the changes made since the last ClearChanges.
|
||||||
|
Loading…
Reference in New Issue
Block a user