Chlumsky / msdfgen

Multi-channel signed distance field generator
MIT License
3.9k stars 404 forks source link

Renaming SignedDistance::INFINITE to avoid a collision with MSVC's macro #137

Closed dubgron closed 2 years ago

dubgron commented 2 years ago

Hey! I have an issue compiling msdfgen using Visual Studio 2022 due to the following macro defined in WinBase.h:

define INFINITE 0xFFFFFFFF // Infinite timeout

And it causes following errors:

msdf-atlas-gen\msdfgen\core\SignedDistance.h(10,33): error C2059: syntax error: 'constant' msdf-atlas-gen\msdfgen\core\SignedDistance.h(10,41): error C2238: unexpected token(s) preceding ';'

Simple #undef INFINITE would do the work but I don't think it's a totally safe solution. Would you mind changing the variable's name to avoid this name collision?

Chlumsky commented 2 years ago

OK, I deleted it.