diff --git a/tiny_gltf.h b/tiny_gltf.h index ee596e9..81458a6 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -1086,7 +1086,21 @@ class TinyGLTF { #endif #ifdef _WIN32 -#include + +// 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 // include API for expanding a file path + +#if defined(TINYGLTF_INTERNAL_NOMINMAX) +#undef NOMINMAX +#endif + #elif !defined(__ANDROID__) #include #endif