Page MenuHome

MSVC fixes for tile branch
Closed, ArchivedPublicPATCH

Description

Explanation of changes:
- I'm guessing overload resolution rules are different between GCC and MSVC. Combine that with sqrtf getting defined to be sqrt, and it causes these issues by making it tough for the compiler to distinguish whether a call should go to an overload taking a double or the one taking a float. Solution is to put explicit casts in the powf and sqrtf macros, and a few other uses, that help the compiler locate the correct overloads.
- Changed a couple #define BLAH true, to be #define BLAH TRUE... TRUE==1, and MSVC apparently requires ints for #if BLAH, and doesn't accept bools...
- Apparently gcc allows dynamic sizes in stack-allocated array definitions? Well, using new to allocate and delete to free should be the same thing.

Note:
- I didn't try building this on linux, would be good to check I didn't bust that somehow
- I didn't try testing these changes at all, just got it building. I don't know enough about new compositor code to see if it works

Event Timeline

Thomas has submitted these MSVC fixes to the tile branch

Andrew Wiggin (ender79) changed the task status from Unknown Status to Unknown Status.Dec 6 2011, 11:49 PM