diff --git a/CMakeLists.txt b/CMakeLists.txt index d2033f0bf4..c026dc6f97 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -101,6 +101,9 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX) endif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX) if(CMAKE_COMPILER_IS_CLANGXX) + # Disable warning about potentially uninstantiated static members + # because it leads to a lot of false-positives. + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-undefined-var-template") # older boost.preprocessor turn off variadics for clang add_definitions(-DBOOST_PP_VARIADICS=1) message(STATUS "Force BOOST_PP_VARIADICS=1 for clang") diff --git a/src/Gui/QuantitySpinBox.cpp b/src/Gui/QuantitySpinBox.cpp index 19a20735d4..7550911257 100644 --- a/src/Gui/QuantitySpinBox.cpp +++ b/src/Gui/QuantitySpinBox.cpp @@ -289,7 +289,6 @@ void Gui::QuantitySpinBox::setExpression(boost::shared_ptr expr) QString QuantitySpinBox::boundToName() const { - Q_D(const QuantitySpinBox); if (isBound()) { std::string path = getPath().toString(); return QString::fromStdString(path); @@ -305,7 +304,6 @@ QString QuantitySpinBox::boundToName() const */ void QuantitySpinBox::setBoundToByName(const QString &name) { - Q_D(QuantitySpinBox); try { // get document App::Document *doc = App::GetApplication().getActiveDocument(); @@ -350,7 +348,6 @@ void QuantitySpinBox::setBoundToByName(const QString &name) QString Gui::QuantitySpinBox::expressionText() const { - Q_D(const QuantitySpinBox); try { if (hasExpression()) { return QString::fromStdString(getExpressionString()); diff --git a/src/Mod/Path/App/Area.cpp b/src/Mod/Path/App/Area.cpp index d94515dd90..237969b29f 100644 --- a/src/Mod/Path/App/Area.cpp +++ b/src/Mod/Path/App/Area.cpp @@ -22,6 +22,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ +# include #endif #include @@ -2804,9 +2805,8 @@ std::list Area::sortWires(const std::list &shapes, double max_dist = sort_mode==SortModeGreedy?threshold*threshold:0; while(shape_list.size()) { AREA_TRACE("sorting " << shape_list.size() << ' ' << AREA_XYZ(pstart)); - double best_d; + double best_d = DBL_MAX; auto best_it = shape_list.begin(); - bool first = true; for(auto it=best_it;it!=shape_list.end();++it) { double d; gp_Pnt pt; @@ -2814,8 +2814,7 @@ std::list Area::sortWires(const std::list &shapes, d = it->myPln.SquareDistance(pstart); else d = it->nearest(pstart); - if(first || dgetName(), sketchObject->getNameInDocument(), ss.str().c_str()); diff --git a/src/Mod/TechDraw/App/DrawViewMulti.h b/src/Mod/TechDraw/App/DrawViewMulti.h index 4d8bf98e23..924860f571 100644 --- a/src/Mod/TechDraw/App/DrawViewMulti.h +++ b/src/Mod/TechDraw/App/DrawViewMulti.h @@ -50,7 +50,7 @@ namespace TechDraw */ class TechDrawExport DrawViewMulti : public DrawViewPart { - PROPERTY_HEADER(Part::DrawViewMulti); + PROPERTY_HEADER_WITH_OVERRIDE(Part::DrawViewMulti); public: /// Constructor