Changeset - r4988:fdd36077b23c
[Not reviewed]
master
0 1 0
tron - 18 years ago 2006-10-28 12:32:55
tron@openttd.org
(svn r6991) Remove an unnecessary const_cast<> and incorrect comment (There is a difference between const FOO* and FOO* const)
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
yapf/fixedsizearray.hpp
Show inline comments
 
@@ -38,13 +38,13 @@ struct CFixedSizeArrayT {
 
	}
 

	
 
	/** Copy constructor. Preallocate space for items and header, then initialize header. */
 
	CFixedSizeArrayT(const CFixedSizeArrayT<Titem_, Tcapacity_>& src)
 
	{
 
		// share block (header + items) with the source array
 
		m_items = const_cast<Titem*>(src.m_items); // here we break the 'const' modifier
 
		m_items = src.m_items;
 
		RefCnt()++; // now we share block with the source
 
	}
 

	
 
	/** destroy remaining items and free the memory block */
 
	~CFixedSizeArrayT()
 
	{
0 comments (0 inline, 0 general)