mirror of https://github.com/OpenTTD/OpenTTD
(svn r25402) -Fix-ish: Prevent copying of BasePool and WindowDesc, since they register in static vectors.
parent
bb308c5e30
commit
18ae9c78bc
|
@ -59,6 +59,13 @@ struct PoolBase {
|
|||
* Virtual method that deletes all items in the pool.
|
||||
*/
|
||||
virtual void CleanPool() = 0;
|
||||
|
||||
private:
|
||||
/**
|
||||
* Dummy private copy constructor to prevent compilers from
|
||||
* copying the structure, which fails due to GetPools().
|
||||
*/
|
||||
PoolBase(const PoolBase &other);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -106,6 +106,7 @@ WindowDesc::WindowDesc(WindowPosition def_pos, const char *ini_key, int16 def_wi
|
|||
|
||||
WindowDesc::~WindowDesc()
|
||||
{
|
||||
_window_descs->Erase(_window_descs->Find(this));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -197,6 +197,13 @@ struct WindowDesc : ZeroedMemoryAllocator {
|
|||
|
||||
static void LoadFromConfig();
|
||||
static void SaveToConfig();
|
||||
|
||||
private:
|
||||
/**
|
||||
* Dummy private copy constructor to prevent compilers from
|
||||
* copying the structure, which fails due to _window_descs.
|
||||
*/
|
||||
WindowDesc(const WindowDesc &other);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue