(svn r6991) Remove an unnecessary const_cast<> and incorrect comment (There is a difference between const FOO* and FOO* const)
authortron
Sat, 28 Oct 2006 12:32:55 +0000
changeset 4988 879ba90441d1
parent 4987 09955f8b87c4
child 4989 3d6541afbbaf
(svn r6991) Remove an unnecessary const_cast<> and incorrect comment (There is a difference between const FOO* and FOO* const)
yapf/fixedsizearray.hpp
--- a/yapf/fixedsizearray.hpp	Sat Oct 28 12:12:20 2006 +0000
+++ b/yapf/fixedsizearray.hpp	Sat Oct 28 12:32:55 2006 +0000
@@ -41,7 +41,7 @@
 	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
 	}