diff --git a/src/libslic3r/Fill/Lightning/Layer.cpp b/src/libslic3r/Fill/Lightning/Layer.cpp index c381d5505..f3193afe4 100644 --- a/src/libslic3r/Fill/Lightning/Layer.cpp +++ b/src/libslic3r/Fill/Lightning/Layer.cpp @@ -129,9 +129,10 @@ GroundingLocation Layer::getBestGroundingLocation if (contour.size() > 2) { Point prev = contour.points.back(); for (const Point &p2 : contour.points) { - if (double d = Line::distance_to_squared(unsupported_location, prev, p2); d < d2) { + Point closest_point; + if (double d = line_alg::distance_to_squared(Line{prev, p2}, unsupported_location, &closest_point); d < d2) { d2 = d; - node_location = Geometry::foot_pt({ prev, p2 }, unsupported_location).cast(); + node_location = closest_point; } prev = p2; } diff --git a/src/slic3r/GUI/SendSystemInfoDialog.cpp b/src/slic3r/GUI/SendSystemInfoDialog.cpp index 9a97532a7..03a38acbf 100644 --- a/src/slic3r/GUI/SendSystemInfoDialog.cpp +++ b/src/slic3r/GUI/SendSystemInfoDialog.cpp @@ -141,7 +141,7 @@ static bool check_internet_connection_win() { bool internet = true; // return true if COM object creation fails. - if (CoInitializeEx(NULL, COINIT_APARTMENTTHREADED) == S_OK) { + if (SUCCEEDED(CoInitializeEx(NULL, COINIT_APARTMENTTHREADED))) { { CComPtr pNLM; if (pNLM.CoCreateInstance(CLSID_NetworkListManager) == S_OK) { diff --git a/src/slic3r/Utils/Http.cpp b/src/slic3r/Utils/Http.cpp index 68ddda041..a6ad54b32 100644 --- a/src/slic3r/Utils/Http.cpp +++ b/src/slic3r/Utils/Http.cpp @@ -181,7 +181,7 @@ Http::priv::~priv() bool Http::priv::ca_file_supported(::CURL *curl) { -#ifdef _WIN32 +#if defined(_WIN32) || defined(__APPLE__) bool res = false; #else bool res = true; @@ -194,6 +194,7 @@ bool Http::priv::ca_file_supported(::CURL *curl) if (::curl_easy_getinfo(curl, CURLINFO_TLS_SSL_PTR, &tls) == CURLE_OK) { if (tls->backend == CURLSSLBACKEND_SCHANNEL || tls->backend == CURLSSLBACKEND_DARWINSSL) { // With Windows and OS X native SSL support, cert files cannot be set + // DK: OSX is now not building CURL and links system one, thus we do not know which backend is installed. Still, false will be returned since the ifdef at the begining if this function. res = false; } }