diff --git a/code/glTF/glTFExporter.cpp b/code/glTF/glTFExporter.cpp index 676f8a83b..3faa1a84b 100644 --- a/code/glTF/glTFExporter.cpp +++ b/code/glTF/glTFExporter.cpp @@ -58,6 +58,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // Header files, standard library. #include +#include #include #ifdef ASSIMP_IMPORTER_GLTF_USE_OPEN3DGC @@ -181,8 +182,8 @@ void SetAccessorRange(Ref acc, void* data, unsigned int count, // Allocate and initialize with large values. for (unsigned int i = 0 ; i < numCompsOut ; i++) { - acc->min.push_back(DBL_MAX); - acc->max.push_back(DBL_MIN); + acc->min.push_back( std::numeric_limits::max()); + acc->max.push_back(-std::numeric_limits::max()); } size_t totalComps = count * numCompsIn; diff --git a/code/glTF2/glTF2Exporter.cpp b/code/glTF2/glTF2Exporter.cpp index 01ec1ba5a..f85803b52 100644 --- a/code/glTF2/glTF2Exporter.cpp +++ b/code/glTF2/glTF2Exporter.cpp @@ -58,6 +58,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // Header files, standard library. #include +#include #include using namespace rapidjson; @@ -160,8 +161,8 @@ void SetAccessorRange(Ref acc, void* data, size_t count, // Allocate and initialize with large values. for (unsigned int i = 0 ; i < numCompsOut ; i++) { - acc->min.push_back(DBL_MAX); - acc->max.push_back(DBL_MIN); + acc->min.push_back( std::numeric_limits::max()); + acc->max.push_back(-std::numeric_limits::max()); } size_t totalComps = count * numCompsIn;