mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-13 18:01:48 +08:00
Yet another clang compiler warning suppressed.
This commit is contained in:
parent
2393d64a5a
commit
f61119e02f
@ -678,6 +678,7 @@ static inline bool line_rounded_thick_segment_collision(
|
|||||||
return intersects;
|
return intersects;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
static inline bool inside_interval(double low, double high, double p)
|
static inline bool inside_interval(double low, double high, double p)
|
||||||
{
|
{
|
||||||
return p >= low && p <= high;
|
return p >= low && p <= high;
|
||||||
@ -690,7 +691,6 @@ static inline bool interval_inside_interval(double outer_low, double outer_high,
|
|||||||
return inside_interval(outer_low, outer_high, inner_low) && inside_interval(outer_low, outer_high, inner_high);
|
return inside_interval(outer_low, outer_high, inner_low) && inside_interval(outer_low, outer_high, inner_high);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
static inline bool cyclic_interval_inside_interval(double outer_low, double outer_high, double inner_low, double inner_high, double length)
|
static inline bool cyclic_interval_inside_interval(double outer_low, double outer_high, double inner_low, double inner_high, double length)
|
||||||
{
|
{
|
||||||
if (outer_low > outer_high)
|
if (outer_low > outer_high)
|
||||||
|
@ -52,7 +52,7 @@ static inline std::pair<float, float> face_z_span(const stl_facet &f)
|
|||||||
// https://tams.informatik.uni-hamburg.de/publications/2017/Adaptive%20Slicing%20for%20the%20FDM%20Process%20Revisited.pdf
|
// https://tams.informatik.uni-hamburg.de/publications/2017/Adaptive%20Slicing%20for%20the%20FDM%20Process%20Revisited.pdf
|
||||||
// (page 51, formula (8))
|
// (page 51, formula (8))
|
||||||
// Currenty @platch's error metric formula is not used.
|
// Currenty @platch's error metric formula is not used.
|
||||||
static constexpr const double SURFACE_CONST = 0.18403;
|
//static constexpr const double SURFACE_CONST = 0.18403;
|
||||||
|
|
||||||
// for a given facet, compute maximum height within the allowed surface roughness / stairstepping deviation
|
// for a given facet, compute maximum height within the allowed surface roughness / stairstepping deviation
|
||||||
static inline float layer_height_from_slope(const SlicingAdaptive::FaceZ &face, float max_surface_deviation)
|
static inline float layer_height_from_slope(const SlicingAdaptive::FaceZ &face, float max_surface_deviation)
|
||||||
|
@ -52,9 +52,8 @@ static void unmount_callback(DADiskRef disk, DADissenterRef dissenter, void *con
|
|||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
DADiskRef disk;
|
DADiskRef disk;
|
||||||
DASessionRef session;
|
CFDictionaryRef descDict = nullptr;
|
||||||
CFDictionaryRef descDict;
|
DASessionRef session = DASessionCreate(nullptr);
|
||||||
session = DASessionCreate(nullptr);
|
|
||||||
if (session == nullptr)
|
if (session == nullptr)
|
||||||
err = EINVAL;
|
err = EINVAL;
|
||||||
if (err == 0) {
|
if (err == 0) {
|
||||||
@ -96,16 +95,15 @@ static void unmount_callback(DADiskRef disk, DADissenterRef dissenter, void *con
|
|||||||
//this eject drive is not used now
|
//this eject drive is not used now
|
||||||
-(void)eject_drive:(NSString *)path
|
-(void)eject_drive:(NSString *)path
|
||||||
{
|
{
|
||||||
DADiskRef disk;
|
|
||||||
DASessionRef session;
|
|
||||||
NSURL *url = [[NSURL alloc] initFileURLWithPath:path];
|
NSURL *url = [[NSURL alloc] initFileURLWithPath:path];
|
||||||
|
DASessionRef session = DASessionCreate(nullptr);
|
||||||
int err = 0;
|
int err = 0;
|
||||||
session = DASessionCreate(nullptr);
|
|
||||||
if (session == nullptr)
|
if (session == nullptr)
|
||||||
err = EINVAL;
|
err = EINVAL;
|
||||||
|
DADiskRef disk = nullptr;
|
||||||
|
if (err == 0)
|
||||||
|
disk = DADiskCreateFromVolumePath(nullptr, session, (CFURLRef)url);
|
||||||
if (err == 0)
|
if (err == 0)
|
||||||
disk = DADiskCreateFromVolumePath(nullptr,session,(CFURLRef)url);
|
|
||||||
if( err == 0)
|
|
||||||
//DADiskUnmount(disk, kDADiskUnmountOptionDefault, nullptr, nullptr);
|
//DADiskUnmount(disk, kDADiskUnmountOptionDefault, nullptr, nullptr);
|
||||||
DADiskUnmount(disk, kDADiskUnmountOptionWhole | kDADiskUnmountOptionForce, unmount_callback, nullptr);
|
DADiskUnmount(disk, kDADiskUnmountOptionWhole | kDADiskUnmountOptionForce, unmount_callback, nullptr);
|
||||||
if (disk != nullptr)
|
if (disk != nullptr)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user