Skip to content

Commit

Permalink
Added NOMINMAX macro definition
Browse files Browse the repository at this point in the history
Without this macro, there are following errors in VS:

```bash
...\vsg\src\include\vsg/viewer/Window.h(156): warning C4003: not enough arguments for function-like macro invocation 'max'
1>...\vsg\src\include\vsg/viewer/Window.h(156): error C2589: '(': illegal token on right side of '::'
1>...\vsg\src\include\vsg/viewer/Window.h(156): error C2059: syntax error: ')'
1>...\vsg\src\include\vsg/viewer/Window.h(156): error C2062: type 'unknown-type' unexpected
1>...\vsg\src\include\vsg/viewer/Window.h(219): fatal error C1903: unable to recover from previous error(s); stopping compilation
```

Since we already in `platform/win32/Win32_Window.h`, I skipped the `ifdef _WIN32` guard
  • Loading branch information
olegded authored Feb 13, 2019
1 parent 691dbfa commit 615bf90
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/vsg/platform/win32/Win32_Window.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI

#define VK_USE_PLATFORM_WIN32_KHR

#ifndef NOMINMAX
# define NOMINMAX
#endif

#include <vsg/viewer/Window.h>
#include <vsg/ui/KeyEvent.h>
#include <vsg/ui/PointerEvent.h>
Expand Down

0 comments on commit 615bf90

Please sign in to comment.