Skip to content

Commit cdcd137

Browse files
committed
Better way to resolve the windows.h max macro conflicts.
1 parent a3b465a commit cdcd137

3 files changed

Lines changed: 3 additions & 12 deletions

File tree

include/react/detail/Defs.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,6 @@
66

77
#pragma once
88

9-
#define NOMINMAX
10-
11-
#ifdef max
12-
#undef max
13-
#endif
14-
#ifdef min
15-
#undef min
16-
#endif
17-
189
#include <cassert>
1910
#include <cstddef>
2011

include/react/detail/ReactiveInput.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ class InputManager
155155
{
156156
auto curId = nextTurnId_.fetch_add(1, std::memory_order_relaxed);
157157

158-
if (curId == std::numeric_limits<int>::max())
159-
nextTurnId_.fetch_sub(std::numeric_limits<int>::max());
158+
if (curId == (std::numeric_limits<int>::max)())
159+
nextTurnId_.fetch_sub((std::numeric_limits<int>::max)());
160160

161161
return curId;
162162
}

include/react/detail/graph/EventNodes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class EventStreamNode :
7575

7676
protected:
7777
DataT events_;
78-
uint curTurnId_ = std::numeric_limits<int>::max();
78+
uint curTurnId_ = (std::numeric_limits<int>::max)();
7979
};
8080

8181
template <typename D, typename E>

0 commit comments

Comments
 (0)