fix various compiler warnings

This commit is contained in:
wmayer 2016-08-09 13:16:26 +02:00
parent 507b39e3fc
commit 1c1f0dfe49
10 changed files with 11 additions and 8 deletions

View File

@ -158,7 +158,7 @@ public:
};
struct NonNullFilter: public Filter
{
bool operator()(const SMDS_MeshElement* e) const { return e; }
bool operator()(const SMDS_MeshElement* e) const { return e != 0; }
};
struct TypeFilter : public Filter
{

View File

@ -74,7 +74,7 @@ class SMDS_EXPORT SMDS_VolumeTool
int ID() const;
// return element ID
bool IsPoly() const { return myPolyedre; }
bool IsPoly() const { return myPolyedre != 0; }
// -----------------------
// general info

View File

@ -75,6 +75,7 @@ DEF_MSG_BUFFER << os.str() << std::endl;
/* --- To print date and time of compilation of current source --- */
#ifndef COMPILER
#if defined ( __GNUC__ )
#define COMPILER "g++"
#elif defined ( __sun )
@ -90,6 +91,7 @@ DEF_MSG_BUFFER << os.str() << std::endl;
#else
#define COMPILER "undefined"
#endif
#endif
#ifdef INFOS_COMPILATION
#error INFOS_COMPILATION already defined

View File

@ -156,7 +156,7 @@ App::DocumentObjectExecReturn *MultiCommon::execute(void)
TopTools_IndexedMapOfShape facesOfCompound;
TopAbs_ShapeEnum type = TopAbs_FACE;
TopExp::MapShapes(compoundOfArguments, type, facesOfCompound);
for (int iChild = 0; iChild < history.size(); iChild++){ //loop over children of source compound
for (std::size_t iChild = 0; iChild < history.size(); iChild++){ //loop over children of source compound
//for each face of a child, find the inex of the face in compound, and assign the corresponding right-hand-size of the history
TopTools_IndexedMapOfShape facesOfChild;
TopExp::MapShapes(s[iChild], type, facesOfChild);

View File

@ -181,7 +181,7 @@ App::DocumentObjectExecReturn *MultiFuse::execute(void)
TopTools_IndexedMapOfShape facesOfCompound;
TopAbs_ShapeEnum type = TopAbs_FACE;
TopExp::MapShapes(compoundOfArguments, type, facesOfCompound);
for (int iChild = 0; iChild < history.size(); iChild++){ //loop over children of source compound
for (std::size_t iChild = 0; iChild < history.size(); iChild++){ //loop over children of source compound
//for each face of a child, find the inex of the face in compound, and assign the corresponding right-hand-size of the history
TopTools_IndexedMapOfShape facesOfChild;
TopExp::MapShapes(s[iChild], type, facesOfChild);

View File

@ -458,7 +458,7 @@ void DlgRevolution::on_txtAxisLink_textChanged(QString)
}
en = false;
}
} catch (Base::Exception &err){
} catch (Base::Exception &){
} catch (...){

View File

@ -23,8 +23,8 @@
#include "PreCompiled.h"
#ifndef _PreComp_
# include <Standard_math.hxx>
# include <Python.h>
# include <Standard_math.hxx>
# include <Inventor/nodes/SoLineSet.h>
# include <Inventor/nodes/SoBaseColor.h>
# include <Inventor/nodes/SoSeparator.h>

View File

@ -159,7 +159,7 @@ App::DocumentObjectExecReturn *DrawViewSection::execute(void)
pnts.push_back(Base::Vector3d(bb.MinX,bb.MaxY,bb.MaxZ));
pnts.push_back(Base::Vector3d(bb.MaxX,bb.MaxY,bb.MaxZ));
double uMax = 0, vMax = 0, wMax;
double uMax = 0, vMax = 0, wMax = 0;
for(std::vector<Base::Vector3d>::const_iterator it = pnts.begin(); it != pnts.end(); ++it) {
// Project each bounding box point onto projection plane and find larges u,v values

View File

@ -82,6 +82,7 @@ void QGIPrimPath::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
{
QGIView *view = dynamic_cast<QGIView *> (parentItem()); //this is temp for debug??
assert(view != 0);
Q_UNUSED(view);
if(!isSelected() && !isHighlighted) {
setPrettyNormal();
}

View File

@ -768,7 +768,7 @@ void QGIViewDimension::draw()
Base::Vector3d pointOnCurve,curveCenter;
double radius;
TechDrawGeometry::AOC* geomArc;
TechDrawGeometry::AOC* geomArc = 0;
bool isArc = false;
if(dim->References2D.getValues().size() == 1 &&
TechDraw::DrawUtil::getGeomTypeFromName(SubNames[0]) == "Edge") {