mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-03 04:43:12 +00:00
(svn r6991) Remove an unnecessary const_cast<> and incorrect comment (There is a difference between const FOO* and FOO* const)
This commit is contained in:
parent
cb4918d06b
commit
93f1f8ee53
@ -41,7 +41,7 @@ struct CFixedSizeArrayT {
|
|||||||
CFixedSizeArrayT(const CFixedSizeArrayT<Titem_, Tcapacity_>& src)
|
CFixedSizeArrayT(const CFixedSizeArrayT<Titem_, Tcapacity_>& src)
|
||||||
{
|
{
|
||||||
// share block (header + items) with the source array
|
// 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
|
RefCnt()++; // now we share block with the source
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user