mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-14 11:15:54 +08:00
Define NOMINMAX to avoid defining MIN/MAX macros on Windows. Without defining NOMINMAX, MIN/MAX macro would affect other header/c++ files. Fixes #143
This commit is contained in:
parent
7ece5c8275
commit
7d9a0bda3a
16
tiny_gltf.h
16
tiny_gltf.h
@ -1086,7 +1086,21 @@ class TinyGLTF {
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
|
||||
// issue 143.
|
||||
// Define NOMINMAX to avoid min/max defines,
|
||||
// but undef it after included windows.h
|
||||
#ifndef NOMINMAX
|
||||
#define TINYGLTF_INTERNAL_NOMINMAX
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
|
||||
#include <windows.h> // include API for expanding a file path
|
||||
|
||||
#if defined(TINYGLTF_INTERNAL_NOMINMAX)
|
||||
#undef NOMINMAX
|
||||
#endif
|
||||
|
||||
#elif !defined(__ANDROID__)
|
||||
#include <wordexp.h>
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user