Page 1 of 1
[Bug + Fix] MSVC 10 Compilation Error
Posted: Wed Dec 30, 2009 12:30
by Cypherjb
CEGUI fails to compile under MSVC 10 B2 due to line 702 in CEGUIMultiColumnList.cpp.
Simply using static_cast on the null pointer resolves the issue and should have no effect on runtime behaviour or compilation under other implementations.
Replacement for line 702:
d_grid[i].d_items.insert(d_grid[i].d_items.begin() + position, static_cast<ListboxItem*>(0));
Re: [Bug + Fix] MSVC 10 Compilation Error
Posted: Wed Dec 30, 2009 18:53
by CrazyEddie
Hi there,
Thanks for the info and the fix. This was also mentioned a while ago here:
viewtopic.php?f=10&t=4211. I'm linking that in order that both possible solutions can be found together (by us) at a later date if need be
Actually, I'll probably just go ahead and commit this one tomorrow, since it's the more compatible of the two solutions offered, and - as you say - will not impact on other compilers at all.
CE.
Re: [Bug + Fix] MSVC 10 Compilation Error
Posted: Fri Jan 01, 2010 13:00
by Cypherjb
Yep, the solution posted in the other thread is the one I tried first (because I had a similar problem in my own code when upgrading), but I know that CEGUI needs to retain backwards compatibility so I opted for an approach that should be safe across all compilers.
Thanks for the reply.
Re: [Bug + Fix] MSVC 10 Compilation Error
Posted: Fri Jan 01, 2010 17:42
by CrazyEddie
I only spotted today that the other thread was your also
Anyway, this fix is in the v0-7 branch as of this afternoon, and will get merged to head in the next merge.
Thanks again,
CE.