Skip to content

Commit

Permalink
Guard NOMINMAX to prevent redefinition error (#1581) (#1582)
Browse files Browse the repository at this point in the history
Fixes #1581.
  • Loading branch information
dushko authored Mar 30, 2023
1 parent f7547e2 commit b177433
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/internal_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@
#define BENCHMARK_OS_WINDOWS 1
// WINAPI_FAMILY_PARTITION is defined in winapifamily.h.
// We include windows.h which implicitly includes winapifamily.h for compatibility.
#define NOMINMAX
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <windows.h>
#if defined(WINAPI_FAMILY_PARTITION)
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
Expand Down

0 comments on commit b177433

Please sign in to comment.