Permit building on MSVC 2017 (15.7.6)

This commit is contained in:
Joseph Lenox 2018-08-08 00:20:39 -05:00
parent 3d22fcdd22
commit 3ee452aff6
5 changed files with 12 additions and 5 deletions

View File

@ -12,7 +12,7 @@
#ifndef PORTABLE_ENDIAN_H__ #ifndef PORTABLE_ENDIAN_H__
#define PORTABLE_ENDIAN_H__ #define PORTABLE_ENDIAN_H__
#if (defined(_WIN16) || defined(_WIN32) || defined(_WIN64)) && !defined(__WINDOWS__) #if (defined(_MSC_VER) || defined(_WIN16) || defined(_WIN32) || defined(_WIN64)) && !defined(__WINDOWS__)
# define __WINDOWS__ # define __WINDOWS__
@ -66,7 +66,7 @@
#elif defined(__WINDOWS__) #elif defined(__WINDOWS__)
/* # include <winsock2.h> */ /* # include <winsock2.h> */
# include <sys/param.h> /* # include <sys/param.h> */
# if BYTE_ORDER == LITTLE_ENDIAN # if BYTE_ORDER == LITTLE_ENDIAN

View File

@ -1,6 +1,7 @@
#include "../ClipperUtils.hpp" #include "../ClipperUtils.hpp"
#include "../PolylineCollection.hpp" #include "../PolylineCollection.hpp"
#include "../Surface.hpp" #include "../Surface.hpp"
#define _USE_MATH_DEFINES
#include <cmath> #include <cmath>
#include <algorithm> #include <algorithm>
#include <iostream> #include <iostream>

View File

@ -1,4 +1,5 @@
#include "libslic3r.h" #include "libslic3r.h"
#include <limits>
#include "TriangleMesh.hpp" #include "TriangleMesh.hpp"
#include "SlicingAdaptive.hpp" #include "SlicingAdaptive.hpp"

View File

@ -490,9 +490,9 @@ TriangleMesh::stats() const {
} }
BoundingBoxf3 TriangleMesh::bb3() const { BoundingBoxf3 TriangleMesh::bb3() const {
Pointf3 min(this->stl.stats.min.x, this->stl.stats.min.y, this->stl.stats.min.z); Pointf3 pmin(this->stl.stats.min.x, this->stl.stats.min.y, this->stl.stats.min.z);
Pointf3 max(this->stl.stats.max.x, this->stl.stats.max.y, this->stl.stats.max.z); Pointf3 pmax(this->stl.stats.max.x, this->stl.stats.max.y, this->stl.stats.max.z);
return BoundingBoxf3(min, max); return BoundingBoxf3(pmin, pmax);
} }

View File

@ -4,6 +4,7 @@
// this needs to be included early for MSVC (listing it in Build.PL is not enough) // this needs to be included early for MSVC (listing it in Build.PL is not enough)
#include <ostream> #include <ostream>
#include <iostream> #include <iostream>
#define _USE_MATH_DEFINES
#include <math.h> #include <math.h>
#include <queue> #include <queue>
#include <sstream> #include <sstream>
@ -11,6 +12,10 @@
#include <boost/thread.hpp> #include <boost/thread.hpp>
#include <cstdint> #include <cstdint>
#ifdef _MSC_VER
#include <limits>
#define NOMINMAX
#endif
/* Implementation of CONFESS("foo"): */ /* Implementation of CONFESS("foo"): */
#ifdef _MSC_VER #ifdef _MSC_VER
#define CONFESS(...) confess_at(__FILE__, __LINE__, __FUNCTION__, __VA_ARGS__) #define CONFESS(...) confess_at(__FILE__, __LINE__, __FUNCTION__, __VA_ARGS__)