Skip to content

Conversation

@CraftedCart
Copy link

Avoid defining min/max macros from winmindef.h/minmax.h, since I was bitten by this trying to use std::numeric_limits<T>::max() in a mod I've been tinkering with. :P

  • Everywhere we used to use min/max macros now uses std::min/std::max functions from <algorithm>
  • Headers that include winmindef.h (eg: by including Windows.h directly, or through DirectX headers) now define both WIN32_LEAN_AND_MEAN and NOMINMAX if they weren't already defined, both to avoid the min/max macro pollution, and cut down on how much un-needed stuff from Windows.h gets included
  • Source files that use the windows headers just define WIN32_LEAN_AND_MEAN and NOMINMAX directly at the top too now

… WIN32_LEAN_AND_MEAN everywhere else windows.h is included.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant