[Bug + Fix] MSVC 10 Compilation Error

If you found a bug in our library or on our website, please report it in this section. In this forum you can also make concrete suggestions or feature requests.

Moderators: CEGUI MVP, CEGUI Team

Cypherjb
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Thu Jun 04, 2009 05:11

[Bug + Fix] MSVC 10 Compilation Error

Postby Cypherjb » Wed Dec 30, 2009 12:30

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

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: [Bug + Fix] MSVC 10 Compilation Error

Postby CrazyEddie » Wed Dec 30, 2009 18:53

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.

Cypherjb
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Thu Jun 04, 2009 05:11

Re: [Bug + Fix] MSVC 10 Compilation Error

Postby Cypherjb » Fri Jan 01, 2010 13:00

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.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: [Bug + Fix] MSVC 10 Compilation Error

Postby CrazyEddie » Fri Jan 01, 2010 17:42

I only spotted today that the other thread was your also :lol:

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.


Return to “Bug Reports, Suggestions, Feature Requests”

Who is online

Users browsing this forum: No registered users and 13 guests