diff --git a/src/libslic3r/GCode/SmallAreaInfillFlowCompensator.cpp b/src/libslic3r/GCode/SmallAreaInfillFlowCompensator.cpp index d52b02237d..e472b20794 100644 --- a/src/libslic3r/GCode/SmallAreaInfillFlowCompensator.cpp +++ b/src/libslic3r/GCode/SmallAreaInfillFlowCompensator.cpp @@ -15,6 +15,7 @@ #include "../PrintConfig.hpp" #include "SmallAreaInfillFlowCompensator.hpp" +#include "spline/spline.h" #include namespace Slic3r { @@ -79,6 +80,9 @@ SmallAreaInfillFlowCompensator::SmallAreaInfillFlowCompensator(const Slic3r::GCo BOOST_LOG_TRIVIAL(error) << "Error parsing small area infill compensation model: " << e.what(); } } + +SmallAreaInfillFlowCompensator::~SmallAreaInfillFlowCompensator() = default; + double SmallAreaInfillFlowCompensator::flow_comp_model(const double line_length) { if(flowModel == nullptr) diff --git a/src/libslic3r/GCode/SmallAreaInfillFlowCompensator.hpp b/src/libslic3r/GCode/SmallAreaInfillFlowCompensator.hpp index e25c88522e..1bfa5149f7 100644 --- a/src/libslic3r/GCode/SmallAreaInfillFlowCompensator.hpp +++ b/src/libslic3r/GCode/SmallAreaInfillFlowCompensator.hpp @@ -4,25 +4,20 @@ #include "../libslic3r.h" #include "../PrintConfig.hpp" #include "../ExtrusionEntity.hpp" -#include "spline/spline.h" #include -namespace Slic3r { +namespace tk { +class spline; +} // namespace tk -#ifndef _WIN32 -// Currently on Linux/macOS, this class spits out large amounts of subobject linkage -// warnings because of the flowModel field. tk::spline is in an anonymous namespace which -// causes this issue. Until the issue can be solved, this is a temporary solution. -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wsubobject-linkage" -#endif +namespace Slic3r { class SmallAreaInfillFlowCompensator { public: SmallAreaInfillFlowCompensator() = delete; explicit SmallAreaInfillFlowCompensator(const Slic3r::GCodeConfig& config); - ~SmallAreaInfillFlowCompensator() = default; + ~SmallAreaInfillFlowCompensator(); double modify_flow(const double line_length, const double dE, const ExtrusionRole role); @@ -39,10 +34,6 @@ private: double max_modified_length() { return eLengths.back(); } }; -#ifndef _WIN32 -#pragma GCC diagnostic pop -#endif - } // namespace Slic3r #endif /* slic3r_GCode_SmallAreaInfillFlowCompensator_hpp_ */ diff --git a/src/spline/spline.h b/src/spline/spline.h index c8f08418fb..4b1ddd6134 100644 --- a/src/spline/spline.h +++ b/src/spline/spline.h @@ -46,11 +46,6 @@ #pragma GCC diagnostic ignored "-Wunused-function" #endif -// unnamed namespace only because the implementation is in this -// header file and we don't want to export symbols to the obj files -namespace -{ - namespace tk { @@ -942,8 +937,6 @@ std::vector solve_cubic(double a, double b, double c, double d, } // namespace tk -} // namespace - #if !defined(_MSC_VER) #pragma GCC diagnostic pop #endif