Trying to fix the remaining OSX warnings

This commit is contained in:
Vojtech Bubnik 2021-02-10 18:26:29 +01:00
parent 05a6cfeaea
commit 31b2667ba5
4 changed files with 17 additions and 4 deletions

View File

@ -653,8 +653,8 @@ inline bool intersect_ray_all_hits(
std::vector<igl::Hit> &hits)
{
auto ray_intersector = detail::RayIntersectorHits<VertexType, IndexedFaceType, TreeType, VectorType> {
vertices, faces, {tree},
origin, dir, VectorType(dir.cwiseInverse())
{ vertices, faces, {tree},
origin, dir, VectorType(dir.cwiseInverse()) }
};
if (! tree.empty()) {
ray_intersector.hits.reserve(8);

View File

@ -2332,7 +2332,12 @@ static std::vector<MonotonicRegionLink> 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);
};

View File

@ -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;
}

View File

@ -2,9 +2,12 @@
#import <algorithm>
#import <Cocoa/Cocoa.h>
#import <Foundation/Foundation.h>
#import <AppKit/NSScreen.h>
@interface MacDarkMode : NSObject {}
@end
@implementation MacDarkMode