mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 09:47:58 -06:00
Trying to fix the remaining OSX warnings
This commit is contained in:
parent
05a6cfeaea
commit
8049dd1f72
7 changed files with 27 additions and 6 deletions
|
@ -653,8 +653,8 @@ inline bool intersect_ray_all_hits(
|
||||||
std::vector<igl::Hit> &hits)
|
std::vector<igl::Hit> &hits)
|
||||||
{
|
{
|
||||||
auto ray_intersector = detail::RayIntersectorHits<VertexType, IndexedFaceType, TreeType, VectorType> {
|
auto ray_intersector = detail::RayIntersectorHits<VertexType, IndexedFaceType, TreeType, VectorType> {
|
||||||
vertices, faces, {tree},
|
{ vertices, faces, {tree},
|
||||||
origin, dir, VectorType(dir.cwiseInverse())
|
origin, dir, VectorType(dir.cwiseInverse()) }
|
||||||
};
|
};
|
||||||
if (! tree.empty()) {
|
if (! tree.empty()) {
|
||||||
ray_intersector.hits.reserve(8);
|
ray_intersector.hits.reserve(8);
|
||||||
|
|
|
@ -2332,7 +2332,12 @@ static std::vector<MonotonicRegionLink> chain_monotonic_regions(
|
||||||
}
|
}
|
||||||
|
|
||||||
// Probability (unnormalized) of traversing a link between two 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);
|
return pow(path.pheromone, pheromone_alpha) * pow(path.visibility, pheromone_beta);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -195,8 +195,9 @@ private:
|
||||||
template<typename KDTreeIndirectType, typename PointType, typename FilterFn>
|
template<typename KDTreeIndirectType, typename PointType, typename FilterFn>
|
||||||
size_t find_closest_point(const KDTreeIndirectType &kdtree, const PointType &point, FilterFn filter)
|
size_t find_closest_point(const KDTreeIndirectType &kdtree, const PointType &point, FilterFn filter)
|
||||||
{
|
{
|
||||||
|
using CoordType = typename KDTreeIndirectType::CoordType;
|
||||||
|
|
||||||
struct Visitor {
|
struct Visitor {
|
||||||
using CoordType = typename KDTreeIndirectType::CoordType;
|
|
||||||
const KDTreeIndirectType &kdtree;
|
const KDTreeIndirectType &kdtree;
|
||||||
const PointType &point;
|
const PointType &point;
|
||||||
const FilterFn filter;
|
const FilterFn filter;
|
||||||
|
|
|
@ -147,9 +147,16 @@ public:
|
||||||
, m_renderer(m_raw_renderer)
|
, m_renderer(m_raw_renderer)
|
||||||
, m_trafo(trafo)
|
, m_trafo(trafo)
|
||||||
{
|
{
|
||||||
|
#ifdef _MSC_VER
|
||||||
// suppress false MSVC warning C4723: possible division by zero
|
// 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.w_mm /= pd.w_mm;
|
||||||
m_pxdim_scaled.h_mm /= pd.h_mm;
|
m_pxdim_scaled.h_mm /= pd.h_mm;
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif // _MSC_VER
|
||||||
m_renderer.color(foreground);
|
m_renderer.color(foreground);
|
||||||
clear(background);
|
clear(background);
|
||||||
|
|
||||||
|
|
|
@ -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) {
|
if (extra_verbose) {
|
||||||
BOOST_LOG_TRIVIAL(debug) << "avrdude: " << msg;
|
BOOST_LOG_TRIVIAL(debug) << "avrdude: " << msg;
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,7 +80,7 @@ static constexpr const size_t MAX_VERTEX_BUFFER_SIZE = 131072 * 6; // 3.15MB
|
||||||
// Reserve size in number of floats.
|
// Reserve size in number of floats.
|
||||||
static constexpr const size_t VERTEX_BUFFER_RESERVE_SIZE = 131072 * 2; // 1.05MB
|
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.
|
// 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 Slic3r {
|
||||||
namespace GUI {
|
namespace GUI {
|
||||||
|
|
|
@ -2,9 +2,12 @@
|
||||||
|
|
||||||
#import <algorithm>
|
#import <algorithm>
|
||||||
|
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
#import <AppKit/NSScreen.h>
|
#import <AppKit/NSScreen.h>
|
||||||
|
|
||||||
|
@interface MacDarkMode : NSObject {}
|
||||||
|
@end
|
||||||
|
|
||||||
@implementation MacDarkMode
|
@implementation MacDarkMode
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue