diff --git a/src/libslic3r/AABBTreeIndirect.hpp b/src/libslic3r/AABBTreeIndirect.hpp index 70096b557..b11c570f6 100644 --- a/src/libslic3r/AABBTreeIndirect.hpp +++ b/src/libslic3r/AABBTreeIndirect.hpp @@ -653,8 +653,8 @@ inline bool intersect_ray_all_hits( std::vector &hits) { auto ray_intersector = detail::RayIntersectorHits { - vertices, faces, {tree}, - origin, dir, VectorType(dir.cwiseInverse()) + { vertices, faces, {tree}, + origin, dir, VectorType(dir.cwiseInverse()) } }; if (! tree.empty()) { ray_intersector.hits.reserve(8); diff --git a/src/libslic3r/Fill/FillRectilinear.cpp b/src/libslic3r/Fill/FillRectilinear.cpp index 97cd7ca00..07f41de38 100644 --- a/src/libslic3r/Fill/FillRectilinear.cpp +++ b/src/libslic3r/Fill/FillRectilinear.cpp @@ -2332,7 +2332,12 @@ static std::vector chain_monotonic_regions( } // Probability (unnormalized) of traversing a link between two monotonic regions. - auto path_probability = [pheromone_alpha, pheromone_beta](AntPath &path) { + auto path_probability = [ +#ifndef __APPLE__ + // clang complains when capturing constexpr constants. + pheromone_alpha, pheromone_beta +#endif // __APPLE__ + ](AntPath &path) { return pow(path.pheromone, pheromone_alpha) * pow(path.visibility, pheromone_beta); }; diff --git a/src/libslic3r/KDTreeIndirect.hpp b/src/libslic3r/KDTreeIndirect.hpp index 239008559..12e462569 100644 --- a/src/libslic3r/KDTreeIndirect.hpp +++ b/src/libslic3r/KDTreeIndirect.hpp @@ -195,8 +195,9 @@ private: template size_t find_closest_point(const KDTreeIndirectType &kdtree, const PointType &point, FilterFn filter) { + using CoordType = typename KDTreeIndirectType::CoordType; + struct Visitor { - using CoordType = typename KDTreeIndirectType::CoordType; const KDTreeIndirectType &kdtree; const PointType &point; const FilterFn filter; diff --git a/src/libslic3r/SLA/AGGRaster.hpp b/src/libslic3r/SLA/AGGRaster.hpp index e7507378d..3a130956a 100644 --- a/src/libslic3r/SLA/AGGRaster.hpp +++ b/src/libslic3r/SLA/AGGRaster.hpp @@ -147,9 +147,16 @@ public: , m_renderer(m_raw_renderer) , m_trafo(trafo) { +#ifdef _MSC_VER // suppress false MSVC warning C4723: possible division by zero +#pragma warning(push) +#pragma warning(disable : 4723) +#endif // _MSC_VER m_pxdim_scaled.w_mm /= pd.w_mm; m_pxdim_scaled.h_mm /= pd.h_mm; +#ifdef _MSC_VER +#pragma warning(pop) +#endif // _MSC_VER m_renderer.color(foreground); clear(background); diff --git a/src/slic3r/GUI/FirmwareDialog.cpp b/src/slic3r/GUI/FirmwareDialog.cpp index 7a67c0c73..15f055132 100644 --- a/src/slic3r/GUI/FirmwareDialog.cpp +++ b/src/slic3r/GUI/FirmwareDialog.cpp @@ -648,7 +648,12 @@ void FirmwareDialog::priv::perform_upload() } } }) - .on_message([extra_verbose, q](const char* msg, unsigned /* size */) { + .on_message([ +#ifndef __APPLE__ + // clang complains when capturing constants. + extra_verbose, +#endif // __APPLE__ + q](const char* msg, unsigned /* size */) { if (extra_verbose) { BOOST_LOG_TRIVIAL(debug) << "avrdude: " << msg; } diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index bbdcdf5d2..83696ffa3 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -80,7 +80,7 @@ static constexpr const size_t MAX_VERTEX_BUFFER_SIZE = 131072 * 6; // 3.15MB // Reserve size in number of floats. static constexpr const size_t VERTEX_BUFFER_RESERVE_SIZE = 131072 * 2; // 1.05MB // Reserve size in number of floats, maximum sum of all preallocated buffers. -static constexpr const size_t VERTEX_BUFFER_RESERVE_SIZE_SUM_MAX = 1024 * 1024 * 128 / 4; // 128MB +//static constexpr const size_t VERTEX_BUFFER_RESERVE_SIZE_SUM_MAX = 1024 * 1024 * 128 / 4; // 128MB namespace Slic3r { namespace GUI { diff --git a/src/slic3r/Utils/MacDarkMode.mm b/src/slic3r/Utils/MacDarkMode.mm index adbd72aab..512e96b94 100644 --- a/src/slic3r/Utils/MacDarkMode.mm +++ b/src/slic3r/Utils/MacDarkMode.mm @@ -2,9 +2,12 @@ #import +#import #import #import +@interface MacDarkMode : NSObject {} +@end @implementation MacDarkMode