Changeset - r20389:a738ecb74b1a
[Not reviewed]
master
0 3 0
frosch - 11 years ago 2013-06-15 15:06:22
frosch@openttd.org
(svn r25402) -Fix-ish: Prevent copying of BasePool and WindowDesc, since they register in static vectors.
3 files changed with 15 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/core/pool_type.hpp
Show inline comments
 
@@ -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);
 
};
 

	
 
/**
src/window.cpp
Show inline comments
 
@@ -106,6 +106,7 @@ WindowDesc::WindowDesc(WindowPosition de
 

	
 
WindowDesc::~WindowDesc()
 
{
 
	_window_descs->Erase(_window_descs->Find(this));
 
}
 

	
 
/**
src/window_gui.h
Show inline comments
 
@@ -197,6 +197,13 @@ struct WindowDesc : ZeroedMemoryAllocato
 

	
 
	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);
 
};
 

	
 
/**
0 comments (0 inline, 0 general)