+ Fix compiler warnings

This commit is contained in:
wmayer 2013-10-11 12:24:49 +02:00
parent 2a2acf4955
commit 9af4f7ee73
14 changed files with 21 additions and 16 deletions

View File

@ -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<Part::Feature*>(obj);
const Part::TopoShape& toposhape = feat->Shape.getShape();
@ -137,7 +137,7 @@ const bool Constraint::getPoints(std::vector<Base::Vector3d> &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<Part::Feature*>(obj);
const Part::TopoShape& toposhape = feat->Shape.getShape();
@ -160,7 +160,7 @@ const bool Constraint::getPoints(std::vector<Base::Vector3d> &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<Base::Vector3d> &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;

View File

@ -494,6 +494,7 @@ PyObject* FemMeshPy::getNodesByFace(PyObject *args)
return 0;
}
Py::List ret;
throw Py::Exception("Not yet implemented");
}

View File

@ -24,6 +24,7 @@
#include "PreCompiled.h"
#ifndef _PreComp_
# include <Python.h>
# include <Standard_math.hxx>
#endif
#include <Base/Console.h>

View File

@ -23,6 +23,7 @@
#include "PreCompiled.h"
#ifndef _PreComp_
# include <Standard_math.hxx>
# include <QMessageBox>
#endif

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -24,6 +24,7 @@
#include "PreCompiled.h"
#ifndef _PreComp_
# include <Standard_math.hxx>
# include <Inventor/nodes/SoSeparator.h>
# include <Inventor/nodes/SoTranslation.h>
# include <Inventor/nodes/SoRotation.h>

View File

@ -24,13 +24,12 @@
#include "PreCompiled.h"
#ifndef _PreComp_
# include <Standard_math.hxx>
# include <Inventor/nodes/SoSeparator.h>
# include <Inventor/nodes/SoTranslation.h>
# include <Inventor/nodes/SoRotation.h>
# include <Inventor/nodes/SoMultipleCopy.h>
# include <Precision.hxx>
#endif
#include "ViewProviderFemConstraintFixed.h"

View File

@ -24,12 +24,12 @@
#include "PreCompiled.h"
#ifndef _PreComp_
# include <Standard_math.hxx>
# include <Inventor/nodes/SoSeparator.h>
# include <Inventor/nodes/SoTranslation.h>
# include <Inventor/nodes/SoRotation.h>
# include <Inventor/nodes/SoMultipleCopy.h>
# include <Precision.hxx>
#endif
#include "ViewProviderFemConstraintForce.h"

View File

@ -24,6 +24,7 @@
#include "PreCompiled.h"
#ifndef _PreComp_
# include <Standard_math.hxx>
# include <Inventor/nodes/SoSeparator.h>
# include <Inventor/nodes/SoTranslation.h>
# include <Inventor/nodes/SoRotation.h>

View File

@ -24,6 +24,7 @@
#include "PreCompiled.h"
#ifndef _PreComp_
# include <Standard_math.hxx>
# include <Inventor/nodes/SoSeparator.h>
# include <Inventor/nodes/SoTranslation.h>
# include <Inventor/nodes/SoRotation.h>

View File

@ -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:

View File

@ -107,7 +107,7 @@ int Sketch::setUpSketch(const std::vector<Part::Geometry *> &GeoList,
std::vector<Part::Geometry *> 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);