Skip to content

Commit

Permalink
Permit building on MSVC 2017 (15.7.6)
Browse files Browse the repository at this point in the history
  • Loading branch information
lordofhyphens committed Aug 8, 2018
1 parent 3d22fcd commit 3ee452a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions xs/src/admesh/portable_endian.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#ifndef 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__

Expand Down Expand Up @@ -66,7 +66,7 @@
#elif defined(__WINDOWS__)

/* # include <winsock2.h> */
# include <sys/param.h>
/* # include <sys/param.h> */

# if BYTE_ORDER == LITTLE_ENDIAN

Expand Down
1 change: 1 addition & 0 deletions xs/src/libslic3r/Fill/FillGyroid.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "../ClipperUtils.hpp"
#include "../PolylineCollection.hpp"
#include "../Surface.hpp"
#define _USE_MATH_DEFINES
#include <cmath>
#include <algorithm>
#include <iostream>
Expand Down
1 change: 1 addition & 0 deletions xs/src/libslic3r/SlicingAdaptive.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "libslic3r.h"
#include <limits>
#include "TriangleMesh.hpp"
#include "SlicingAdaptive.hpp"

Expand Down
6 changes: 3 additions & 3 deletions xs/src/libslic3r/TriangleMesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -490,9 +490,9 @@ TriangleMesh::stats() const {
}

BoundingBoxf3 TriangleMesh::bb3() const {
Pointf3 min(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);
return BoundingBoxf3(min, max);
Pointf3 pmin(this->stl.stats.min.x, this->stl.stats.min.y, this->stl.stats.min.z);
Pointf3 pmax(this->stl.stats.max.x, this->stl.stats.max.y, this->stl.stats.max.z);
return BoundingBoxf3(pmin, pmax);
}


Expand Down
5 changes: 5 additions & 0 deletions xs/src/libslic3r/libslic3r.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@
// this needs to be included early for MSVC (listing it in Build.PL is not enough)
#include <ostream>
#include <iostream>
#define _USE_MATH_DEFINES
#include <math.h>
#include <queue>
#include <sstream>
#include <vector>
#include <boost/thread.hpp>
#include <cstdint>

#ifdef _MSC_VER
#include <limits>
#define NOMINMAX
#endif
/* Implementation of CONFESS("foo"): */
#ifdef _MSC_VER
#define CONFESS(...) confess_at(__FILE__, __LINE__, __FUNCTION__, __VA_ARGS__)
Expand Down

0 comments on commit 3ee452a

Please sign in to comment.