Skip to content

Commit

Permalink
Work around Windows min/max bug. (ros#21)
Browse files Browse the repository at this point in the history
* Work around Windows min/max bug.

The comments in the code explain why we need this.

Signed-off-by: Chris Lalancette <[email protected]>
  • Loading branch information
clalancette authored Nov 19, 2020
1 parent 3fa8d6a commit 4c90a78
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions urdf/src/model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@
#include <utility>
#include <vector>

// Windows has preprocessor defines for "max", which conflicts with
// several things (one of them being std::numeric_limits<T>::max()). Since
// we know we aren't going to use that macros, and this is a cpp (not header
// file), we just undefine it on Windows.
#ifdef _WIN32
#undef max
#endif

namespace urdf
{
Expand Down

0 comments on commit 4c90a78

Please sign in to comment.