diff --git a/src/Mod/Fem/App/FemConstraint.cpp b/src/Mod/Fem/App/FemConstraint.cpp index ea180d6452..6112c46a18 100644 --- a/src/Mod/Fem/App/FemConstraint.cpp +++ b/src/Mod/Fem/App/FemConstraint.cpp @@ -93,7 +93,7 @@ void Constraint::onChanged(const App::Property* prop) // Extract geometry from References TopoDS_Shape sh; - for (int i = 0; i < Objects.size(); i++) { + for (std::size_t i = 0; i < Objects.size(); i++) { App::DocumentObject* obj = Objects[i]; Part::Feature* feat = static_cast(obj); const Part::TopoShape& toposhape = feat->Shape.getShape(); @@ -137,7 +137,7 @@ const bool Constraint::getPoints(std::vector &points, std::vecto // Extract geometry from References TopoDS_Shape sh; - for (int i = 0; i < Objects.size(); i++) { + for (std::size_t i = 0; i < Objects.size(); i++) { App::DocumentObject* obj = Objects[i]; Part::Feature* feat = static_cast(obj); const Part::TopoShape& toposhape = feat->Shape.getShape(); @@ -160,7 +160,7 @@ const bool Constraint::getPoints(std::vector &points, std::vecto // Create points with 10 units distance, but at least one at the beginning and end of the edge int steps; if (l >= 20) - steps = round(l / 10); + steps = (int)round(l / 10); else steps = 1; double step = (lp - fp) / steps; @@ -194,12 +194,12 @@ const bool Constraint::getPoints(std::vector &points, std::vecto double lu = (l + GCPnts_AbscissaPoint::Length(isoc, Precision::Confusion()))/2.0; int stepsv; if (lv >= 20.0) - stepsv = round(lv / 10); + stepsv = (int)round(lv / 10); else stepsv = 2; // Minimum of three arrows to ensure (as much as possible) that at least one is displayed int stepsu; if (lu >= 20.0) - stepsu = round(lu / 10); + stepsu = (int)round(lu / 10); else stepsu = 2; double stepv = (vlp - vfp) / stepsv; diff --git a/src/Mod/Fem/App/FemMeshPyImp.cpp b/src/Mod/Fem/App/FemMeshPyImp.cpp index b12d9f6f83..dcae203bb5 100755 --- a/src/Mod/Fem/App/FemMeshPyImp.cpp +++ b/src/Mod/Fem/App/FemMeshPyImp.cpp @@ -494,6 +494,7 @@ PyObject* FemMeshPy::getNodesByFace(PyObject *args) return 0; } Py::List ret; + throw Py::Exception("Not yet implemented"); } diff --git a/src/Mod/Fem/Gui/AppFemGui.cpp b/src/Mod/Fem/Gui/AppFemGui.cpp index fa02cbabb5..fbaf712b15 100755 --- a/src/Mod/Fem/Gui/AppFemGui.cpp +++ b/src/Mod/Fem/Gui/AppFemGui.cpp @@ -24,6 +24,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ # include +# include #endif #include diff --git a/src/Mod/Fem/Gui/Command.cpp b/src/Mod/Fem/Gui/Command.cpp index 4380fc62cc..20c8871848 100755 --- a/src/Mod/Fem/Gui/Command.cpp +++ b/src/Mod/Fem/Gui/Command.cpp @@ -23,6 +23,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ +# include # include #endif diff --git a/src/Mod/Fem/Gui/TaskFemConstraintBearing.cpp b/src/Mod/Fem/Gui/TaskFemConstraintBearing.cpp index ba15669b6c..a7d3d3a66c 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintBearing.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintBearing.cpp @@ -112,7 +112,7 @@ TaskFemConstraintBearing::TaskFemConstraintBearing(ViewProviderFemConstraint *Co ui->spinDistance->setMaximum(FLOAT_MAX); ui->spinDistance->setValue(d); ui->listReferences->clear(); - for (int i = 0; i < Objects.size(); i++) + for (std::size_t i = 0; i < Objects.size(); i++) ui->listReferences->addItem(makeRefText(Objects[i], SubElements[i])); if (Objects.size() > 0) ui->listReferences->setCurrentRow(0, QItemSelectionModel::ClearAndSelect); diff --git a/src/Mod/Fem/Gui/TaskFemConstraintFixed.cpp b/src/Mod/Fem/Gui/TaskFemConstraintFixed.cpp index cc9ad5217e..503307f82c 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintFixed.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintFixed.cpp @@ -93,7 +93,7 @@ TaskFemConstraintFixed::TaskFemConstraintFixed(ViewProviderFemConstraintFixed *C // Fill data into dialog elements ui->listReferences->clear(); - for (int i = 0; i < Objects.size(); i++) + for (std::size_t i = 0; i < Objects.size(); i++) ui->listReferences->addItem(makeRefText(Objects[i], SubElements[i])); if (Objects.size() > 0) ui->listReferences->setCurrentRow(0, QItemSelectionModel::ClearAndSelect); @@ -143,7 +143,7 @@ void TaskFemConstraintFixed::onSelectionChanged(const Gui::SelectionChanges& msg } // Avoid duplicates - int pos = 0; + std::size_t pos = 0; for (; pos < Objects.size(); pos++) if (obj == Objects[pos]) break; diff --git a/src/Mod/Fem/Gui/TaskFemConstraintForce.cpp b/src/Mod/Fem/Gui/TaskFemConstraintForce.cpp index 5d58026d89..4ec7f00d3f 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintForce.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintForce.cpp @@ -111,7 +111,7 @@ TaskFemConstraintForce::TaskFemConstraintForce(ViewProviderFemConstraintForce *C ui->spinForce->setMaximum(FLOAT_MAX); ui->spinForce->setValue(f); ui->listReferences->clear(); - for (int i = 0; i < Objects.size(); i++) + for (std::size_t i = 0; i < Objects.size(); i++) ui->listReferences->addItem(makeRefText(Objects[i], SubElements[i])); if (Objects.size() > 0) ui->listReferences->setCurrentRow(0, QItemSelectionModel::ClearAndSelect); @@ -183,7 +183,7 @@ void TaskFemConstraintForce::onSelectionChanged(const Gui::SelectionChanges& msg } // Avoid duplicates - int pos = 0; + std::size_t pos = 0; for (; pos < Objects.size(); pos++) if (obj == Objects[pos]) break; diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintBearing.cpp b/src/Mod/Fem/Gui/ViewProviderFemConstraintBearing.cpp index b046b473f2..7e8073da85 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintBearing.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintBearing.cpp @@ -24,6 +24,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ +# include # include # include # include diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintFixed.cpp b/src/Mod/Fem/Gui/ViewProviderFemConstraintFixed.cpp index 47b848e234..c207335229 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintFixed.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintFixed.cpp @@ -24,13 +24,12 @@ #include "PreCompiled.h" #ifndef _PreComp_ +# include # include - # include # include # include # include - #endif #include "ViewProviderFemConstraintFixed.h" diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintForce.cpp b/src/Mod/Fem/Gui/ViewProviderFemConstraintForce.cpp index 71cdbbf6c1..55b9510151 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintForce.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintForce.cpp @@ -24,12 +24,12 @@ #include "PreCompiled.h" #ifndef _PreComp_ +# include # include # include # include # include # include - #endif #include "ViewProviderFemConstraintForce.h" diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintGear.cpp b/src/Mod/Fem/Gui/ViewProviderFemConstraintGear.cpp index 8ae1e7bcf4..aa4d471886 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintGear.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintGear.cpp @@ -24,6 +24,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ +# include # include # include # include diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintPulley.cpp b/src/Mod/Fem/Gui/ViewProviderFemConstraintPulley.cpp index 5f5401c9a1..584bc0bb9d 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintPulley.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintPulley.cpp @@ -24,6 +24,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ +# include # include # include # include diff --git a/src/Mod/Part/App/modelRefine.h b/src/Mod/Part/App/modelRefine.h index 928ecfbc2d..503dd1bf8d 100644 --- a/src/Mod/Part/App/modelRefine.h +++ b/src/Mod/Part/App/modelRefine.h @@ -115,7 +115,7 @@ namespace ModelRefine public: FaceAdjacencySplitter(const TopoDS_Shell &shell); void split(const FaceVectorType &facesIn); - int getGroupCount() const {return adjacencyArray.size();} + std::size_t getGroupCount() const {return adjacencyArray.size();} const FaceVectorType& getGroup(const std::size_t &index) const {return adjacencyArray[index];} private: @@ -134,7 +134,7 @@ namespace ModelRefine public: FaceEqualitySplitter(){} void split(const FaceVectorType &faces, FaceTypedBase *object); - int getGroupCount() const {return equalityVector.size();} + std::size_t getGroupCount() const {return equalityVector.size();} const FaceVectorType& getGroup(const std::size_t &index) const {return equalityVector[index];} private: diff --git a/src/Mod/Sketcher/App/Sketch.cpp b/src/Mod/Sketcher/App/Sketch.cpp index 1429d08ef2..7339fd9700 100644 --- a/src/Mod/Sketcher/App/Sketch.cpp +++ b/src/Mod/Sketcher/App/Sketch.cpp @@ -107,7 +107,7 @@ int Sketch::setUpSketch(const std::vector &GeoList, std::vector intGeoList, extGeoList; for (int i=0; i < int(GeoList.size())-extGeoCount; i++) intGeoList.push_back(GeoList[i]); - for (int i=int(GeoList.size())-extGeoCount; i < GeoList.size(); i++) + for (int i=int(GeoList.size())-extGeoCount; i < int(GeoList.size()); i++) extGeoList.push_back(GeoList[i]); addGeometry(intGeoList);