fix -Wextra in Part

This commit is contained in:
wmayer 2016-09-22 11:49:28 +02:00
parent 40c79f18e4
commit 1ce73dda96
38 changed files with 129 additions and 64 deletions

View File

@ -75,7 +75,7 @@ PyObject *ArcOfCirclePy::PyMake(struct _typeobject *, PyObject *, PyObject *) /
}
// constructor method
int ArcOfCirclePy::PyInit(PyObject* args, PyObject* kwds)
int ArcOfCirclePy::PyInit(PyObject* args, PyObject* /*kwds*/)
{
PyObject* o;
double u1, u2;
@ -212,12 +212,12 @@ Py::Object ArcOfCirclePy::getCircle(void) const
return Py::Object(new CirclePy(new GeomCircle(circle)), true);
}
PyObject *ArcOfCirclePy::getCustomAttributes(const char* attr) const
PyObject *ArcOfCirclePy::getCustomAttributes(const char* ) const
{
return 0;
}
int ArcOfCirclePy::setCustomAttributes(const char* attr, PyObject *obj)
int ArcOfCirclePy::setCustomAttributes(const char* , PyObject *)
{
return 0;
}

View File

@ -86,7 +86,7 @@ PyObject *ArcOfEllipsePy::PyMake(struct _typeobject *, PyObject *, PyObject *)
}
// constructor method
int ArcOfEllipsePy::PyInit(PyObject* args, PyObject* kwds)
int ArcOfEllipsePy::PyInit(PyObject* args, PyObject* /*kwds*/)
{
PyObject* o;
double u1, u2;
@ -222,12 +222,12 @@ Py::Object ArcOfEllipsePy::getEllipse(void) const
return Py::Object(new EllipsePy(new GeomEllipse(ellipse)), true);
}
PyObject *ArcOfEllipsePy::getCustomAttributes(const char* attr) const
PyObject *ArcOfEllipsePy::getCustomAttributes(const char* ) const
{
return 0;
}
int ArcOfEllipsePy::setCustomAttributes(const char* attr, PyObject *obj)
int ArcOfEllipsePy::setCustomAttributes(const char* , PyObject *)
{
return 0;
}

View File

@ -86,7 +86,7 @@ PyObject *ArcOfHyperbolaPy::PyMake(struct _typeobject *, PyObject *, PyObject *)
}
// constructor method
int ArcOfHyperbolaPy::PyInit(PyObject* args, PyObject* kwds)
int ArcOfHyperbolaPy::PyInit(PyObject* args, PyObject* /*kwds*/)
{
PyObject* o;
double u1, u2;
@ -222,12 +222,12 @@ Py::Object ArcOfHyperbolaPy::getHyperbola(void) const
return Py::Object(new HyperbolaPy(new GeomHyperbola(hyperbola)), true);
}
PyObject *ArcOfHyperbolaPy::getCustomAttributes(const char* attr) const
PyObject *ArcOfHyperbolaPy::getCustomAttributes(const char* ) const
{
return 0;
}
int ArcOfHyperbolaPy::setCustomAttributes(const char* attr, PyObject *obj)
int ArcOfHyperbolaPy::setCustomAttributes(const char* , PyObject *)
{
return 0;
}

View File

@ -84,7 +84,7 @@ PyObject *ArcOfParabolaPy::PyMake(struct _typeobject *, PyObject *, PyObject *)
}
// constructor method
int ArcOfParabolaPy::PyInit(PyObject* args, PyObject* kwds)
int ArcOfParabolaPy::PyInit(PyObject* args, PyObject* /*kwds*/)
{
PyObject* o;
double u1, u2;
@ -210,12 +210,12 @@ Py::Object ArcOfParabolaPy::getParabola(void) const
return Py::Object(new ParabolaPy(new GeomParabola(parabola)), true);
}
PyObject *ArcOfParabolaPy::getCustomAttributes(const char* attr) const
PyObject *ArcOfParabolaPy::getCustomAttributes(const char* ) const
{
return 0;
}
int ArcOfParabolaPy::setCustomAttributes(const char* attr, PyObject *obj)
int ArcOfParabolaPy::setCustomAttributes(const char* , PyObject *)
{
return 0;
}

View File

@ -277,12 +277,12 @@ PyObject* BRepOffsetAPI_MakePipeShellPy::setTransitionMode(PyObject *args)
Py_Return;
}
PyObject *BRepOffsetAPI_MakePipeShellPy::getCustomAttributes(const char* attr) const
PyObject *BRepOffsetAPI_MakePipeShellPy::getCustomAttributes(const char* ) const
{
return 0;
}
int BRepOffsetAPI_MakePipeShellPy::setCustomAttributes(const char* attr, PyObject *obj)
int BRepOffsetAPI_MakePipeShellPy::setCustomAttributes(const char* , PyObject *)
{
return 0;
}

View File

@ -44,7 +44,7 @@ BodyBase::BodyBase()
ADD_PROPERTY(BaseFeature , (0) );
}
const bool BodyBase::hasFeature(const App::DocumentObject* f) const
bool BodyBase::hasFeature(const App::DocumentObject* f) const
{
const std::vector<App::DocumentObject*> &features = Model.getValues();
return f == BaseFeature.getValue() || std::find(features.begin(), features.end(), f) != features.end();
@ -65,7 +65,7 @@ BodyBase* BodyBase::findBodyOf(const App::DocumentObject* f)
return NULL;
}
const bool BodyBase::isAfter(const App::DocumentObject *feature, const App::DocumentObject* target) const {
bool BodyBase::isAfter(const App::DocumentObject *feature, const App::DocumentObject* target) const {
assert (feature);
if (feature == target) {

View File

@ -71,13 +71,13 @@ public:
// These methods are located here to avoid a dependency of ViewProviderSketchObject on PartDesign
/// Remove the feature from the body
virtual void removeFeature(App::DocumentObject* feature){}
virtual void removeFeature(App::DocumentObject*){}
/// Return true if the feature belongs to this body or either the body is based on the feature
const bool hasFeature(const App::DocumentObject *f) const;
bool hasFeature(const App::DocumentObject *f) const;
/// Return true if the feature belongs to the body and is located after the target
const bool isAfter(const App::DocumentObject *feature, const App::DocumentObject *target) const;
bool isAfter(const App::DocumentObject *feature, const App::DocumentObject *target) const;
/**
* Return the body which this feature belongs too, or NULL.

View File

@ -306,12 +306,12 @@ void CirclePy::setYAxis(Py::Object arg)
}
}
PyObject *CirclePy::getCustomAttributes(const char* attr) const
PyObject *CirclePy::getCustomAttributes(const char* ) const
{
return 0;
}
int CirclePy::setCustomAttributes(const char* attr, PyObject *obj)
int CirclePy::setCustomAttributes(const char* , PyObject *)
{
return 0;
}

View File

@ -78,13 +78,13 @@ int OffsetSurfacePy::PyInit(PyObject* args, PyObject* /*kwd*/)
}
}
PyObject* OffsetSurfacePy::uIso(PyObject *args)
PyObject* OffsetSurfacePy::uIso(PyObject *)
{
PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
return 0;
}
PyObject* OffsetSurfacePy::vIso(PyObject *args)
PyObject* OffsetSurfacePy::vIso(PyObject *)
{
PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
return 0;

View File

@ -330,8 +330,8 @@ std::vector<Part::cutFaces> Part::findAllFacesCutBy(
return result;
}
const bool Part::checkIntersection(const TopoDS_Shape& first, const TopoDS_Shape& second,
const bool quick, const bool touch_is_intersection) {
bool Part::checkIntersection(const TopoDS_Shape& first, const TopoDS_Shape& second,
const bool quick, const bool touch_is_intersection) {
Bnd_Box first_bb, second_bb;
BRepBndLib::Add(first, first_bb);
first_bb.SetGap(0);

View File

@ -141,8 +141,8 @@ std::vector<cutFaces> findAllFacesCutBy(const TopoDS_Shape& shape,
* If there is any error in the boolean operations, the check always returns false
*/
PartExport
const bool checkIntersection(const TopoDS_Shape& first, const TopoDS_Shape& second,
const bool quick, const bool touch_is_intersection);
bool checkIntersection(const TopoDS_Shape& first, const TopoDS_Shape& second,
const bool quick, const bool touch_is_intersection);
} //namespace Part

View File

@ -37,12 +37,12 @@ std::string PartFeaturePy::representation(void) const
return std::string("<Part::PartFeature>");
}
PyObject *PartFeaturePy::getCustomAttributes(const char* attr) const
PyObject *PartFeaturePy::getCustomAttributes(const char* ) const
{
return 0;
}
int PartFeaturePy::setCustomAttributes(const char* attr, PyObject *obj)
int PartFeaturePy::setCustomAttributes(const char* , PyObject *)
{
return 0;
}

View File

@ -185,13 +185,13 @@ PyObject* PlateSurfacePy::makeApprox(PyObject *args, PyObject* kwds)
} PY_CATCH_OCC;
}
PyObject* PlateSurfacePy::uIso(PyObject *args)
PyObject* PlateSurfacePy::uIso(PyObject * /*args*/)
{
PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
return 0;
}
PyObject* PlateSurfacePy::vIso(PyObject *args)
PyObject* PlateSurfacePy::vIso(PyObject * /*args*/)
{
PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
return 0;

View File

@ -431,23 +431,23 @@ PyObject *PropertyShapeHistory::getPyObject(void)
return Py::new_reference_to(Py::None());
}
void PropertyShapeHistory::setPyObject(PyObject *value)
void PropertyShapeHistory::setPyObject(PyObject *)
{
}
void PropertyShapeHistory::Save (Base::Writer &writer) const
void PropertyShapeHistory::Save (Base::Writer &) const
{
}
void PropertyShapeHistory::Restore(Base::XMLReader &reader)
void PropertyShapeHistory::Restore(Base::XMLReader &)
{
}
void PropertyShapeHistory::SaveDocFile (Base::Writer &writer) const
void PropertyShapeHistory::SaveDocFile (Base::Writer &) const
{
}
void PropertyShapeHistory::RestoreDocFile(Base::Reader &reader)
void PropertyShapeHistory::RestoreDocFile(Base::Reader &)
{
}

View File

@ -114,6 +114,7 @@ Part::Tools::makeSurface(const TColStd_ListOfTransient &theBoundaries,
const Standard_Integer theNbIter,
const Standard_Integer theMaxDeg)
{
(void)theTol;
//constants for algorithm
const Standard_Integer aNbIter = theNbIter; //number of algorithm iterations
const Standard_Integer aNbPnts = theNbPnts; //sample points per each constraint

View File

@ -923,19 +923,19 @@ Base::BoundBox3d TopoShape::getBoundBox(void) const
return box;
}
void TopoShape::Save (Base::Writer & writer) const
void TopoShape::Save (Base::Writer & ) const
{
}
void TopoShape::Restore(Base::XMLReader &reader)
void TopoShape::Restore(Base::XMLReader &)
{
}
void TopoShape::SaveDocFile (Base::Writer &writer) const
void TopoShape::SaveDocFile (Base::Writer &) const
{
}
void TopoShape::RestoreDocFile(Base::Reader &reader)
void TopoShape::RestoreDocFile(Base::Reader &)
{
}
@ -1396,11 +1396,15 @@ TopoDS_Compound TopoShape::slices(const Base::Vector3d& dir, const std::vector<d
return comp;
}
TopoDS_Shape TopoShape::generalFuse(const std::vector<TopoDS_Shape> &sOthers, Standard_Real tolerance, std::vector<TopTools_ListOfShape>* mapInOut) const
TopoDS_Shape TopoShape::generalFuse(const std::vector<TopoDS_Shape> &sOthers, Standard_Real tolerance,
std::vector<TopTools_ListOfShape>* mapInOut) const
{
if (this->_Shape.IsNull())
Standard_Failure::Raise("Base shape is null");
#if OCC_VERSION_HEX < 0x060900
(void)sOthers;
(void)tolerance;
(void)mapInOut;
throw Base::AttributeError("GFA is available only in OCC 6.9.0 and up.");
#else
BRepAlgoAPI_BuilderAlgo mkGFA;
@ -1520,6 +1524,7 @@ TopoDS_Shape TopoShape::makeTube() const
#else
static Handle(Law_Function) CreateBsFunction (const Standard_Real theFirst, const Standard_Real theLast, const Standard_Real theRadius)
{
(void)theRadius;
//Handle_Law_BSpline aBs;
//Handle_Law_BSpFunc aFunc = new Law_BSpFunc (aBs, theFirst, theLast);
Handle_Law_Constant aFunc = new Law_Constant();
@ -2675,7 +2680,7 @@ const double MeshVertex::MESH_MIN_PT_DIST = gp::Resolution();
void TopoShape::getFaces(std::vector<Base::Vector3d> &aPoints,
std::vector<Facet> &aTopo,
float accuracy, uint16_t flags) const
float accuracy, uint16_t /*flags*/) const
{
if (this->_Shape.IsNull())
return;
@ -2809,7 +2814,7 @@ void TopoShape::setFaces(const std::vector<Base::Vector3d> &Points,
void TopoShape::getPoints(std::vector<Base::Vector3d> &Points,
std::vector<Base::Vector3d> &Normals,
float Accuracy, uint16_t flags) const
float Accuracy, uint16_t /*flags*/) const
{
if (_Shape.IsNull())
return;
@ -2919,6 +2924,9 @@ void TopoShape::getLinesFromSubelement(const Data::Segment* element,
std::vector<Base::Vector3d> &Points,
std::vector<Line> &lines) const
{
(void)element;
(void)Points;
(void)lines;
}
void TopoShape::getFacesFromSubelement(const Data::Segment* element,

View File

@ -764,12 +764,12 @@ Py::Dict TopoShapeFacePy::getPrincipalProperties(void) const
return dict;
}
PyObject *TopoShapeFacePy::getCustomAttributes(const char* attr) const
PyObject *TopoShapeFacePy::getCustomAttributes(const char* ) const
{
return 0;
}
int TopoShapeFacePy::setCustomAttributes(const char* attr, PyObject *obj)
int TopoShapeFacePy::setCustomAttributes(const char* , PyObject *)
{
return 0;
}

View File

@ -1916,6 +1916,7 @@ PyObject* TopoShapePy::proximity(PyObject *args)
//return Py_BuildValue("OO", overlappss1, overlappss2); //subshapes
return Py_BuildValue("OO", overlappssindex1, overlappssindex2); //face indexes
#else
(void)args;
PyErr_SetString(PyExc_NotImplementedError, "proximity requires OCCT >= 6.8.1");
return 0;
#endif
@ -2413,7 +2414,7 @@ PyObject *TopoShapePy::getCustomAttributes(const char* attr) const
return 0;
}
int TopoShapePy::setCustomAttributes(const char* attr, PyObject *obj)
int TopoShapePy::setCustomAttributes(const char* , PyObject *)
{
return 0;
}

View File

@ -94,7 +94,7 @@ CmdPartPickCurveNet::CmdPartPickCurveNet()
void CmdPartPickCurveNet::activated(int iMsg)
{
Q_UNUSED(iMsg);
}
//===========================================================================
@ -116,6 +116,7 @@ CmdPartNewDoc::CmdPartNewDoc()
void CmdPartNewDoc::activated(int iMsg)
{
Q_UNUSED(iMsg);
doCommand(Doc,"d = App.New()");
updateActive();
}
@ -137,9 +138,9 @@ CmdPartBox2::CmdPartBox2()
sPixmap = "Part_Box";
}
void CmdPartBox2::activated(int iMsg)
{
Q_UNUSED(iMsg);
openCommand("Part Box Create");
doCommand(Doc,"from FreeCAD import Base");
doCommand(Doc,"import Part");
@ -180,6 +181,7 @@ CmdPartBox3::CmdPartBox3()
void CmdPartBox3::activated(int iMsg)
{
Q_UNUSED(iMsg);
openCommand("Part Box Create");
doCommand(Doc,"from FreeCAD import Base");
doCommand(Doc,"import Part");
@ -220,6 +222,7 @@ CmdPartPrimitives::CmdPartPrimitives()
void CmdPartPrimitives::activated(int iMsg)
{
Q_UNUSED(iMsg);
PartGui::TaskPrimitives* dlg = new PartGui::TaskPrimitives();
Gui::Control().showDialog(dlg);
}
@ -273,6 +276,7 @@ CmdPartCut::CmdPartCut()
void CmdPartCut::activated(int iMsg)
{
Q_UNUSED(iMsg);
std::vector<Gui::SelectionObject> Sel = getSelection().getSelectionEx(0, Part::Feature::getClassTypeId());
if (Sel.size() != 2) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
@ -350,6 +354,7 @@ CmdPartCommon::CmdPartCommon()
void CmdPartCommon::activated(int iMsg)
{
Q_UNUSED(iMsg);
std::vector<Gui::SelectionObject> Sel = getSelection().getSelectionEx(0, Part::Feature::getClassTypeId());
//test if selected object is a compound, and if it is, look how many children it has...
@ -451,6 +456,7 @@ CmdPartFuse::CmdPartFuse()
void CmdPartFuse::activated(int iMsg)
{
Q_UNUSED(iMsg);
std::vector<Gui::SelectionObject> Sel = getSelection().getSelectionEx(0, Part::Feature::getClassTypeId());
//test if selected object is a compound, and if it is, look how many children it has...
@ -767,6 +773,7 @@ CmdPartCompound::CmdPartCompound()
void CmdPartCompound::activated(int iMsg)
{
Q_UNUSED(iMsg);
unsigned int n = getSelection().countObjectsOfType(Part::Feature::getClassTypeId());
if (n < 1) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
@ -817,6 +824,7 @@ CmdPartSection::CmdPartSection()
void CmdPartSection::activated(int iMsg)
{
Q_UNUSED(iMsg);
std::vector<Gui::SelectionObject> Sel = getSelection().getSelectionEx(0, Part::Feature::getClassTypeId());
if (Sel.size() != 2) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
@ -863,6 +871,7 @@ CmdPartImport::CmdPartImport()
void CmdPartImport::activated(int iMsg)
{
Q_UNUSED(iMsg);
QStringList filter;
filter << QString::fromLatin1("STEP (*.stp *.step)");
filter << QString::fromLatin1("STEP with colors (*.stp *.step)");
@ -922,6 +931,7 @@ CmdPartExport::CmdPartExport()
void CmdPartExport::activated(int iMsg)
{
Q_UNUSED(iMsg);
QStringList filter;
filter << QString::fromLatin1("STEP (*.stp *.step)");
filter << QString::fromLatin1("STEP with colors (*.stp *.step)");
@ -968,6 +978,7 @@ CmdPartImportCurveNet::CmdPartImportCurveNet()
void CmdPartImportCurveNet::activated(int iMsg)
{
Q_UNUSED(iMsg);
QStringList filter;
filter << QString::fromLatin1("%1 (*.stp *.step *.igs *.iges *.brp *.brep)")
.arg(QObject::tr("All CAD Files"));
@ -1014,6 +1025,7 @@ CmdPartMakeSolid::CmdPartMakeSolid()
void CmdPartMakeSolid::activated(int iMsg)
{
Q_UNUSED(iMsg);
std::vector<App::DocumentObject*> objs = Gui::Selection().getObjectsOfType
(Part::Feature::getClassTypeId());
runCommand(Doc, "import Part");
@ -1081,7 +1093,6 @@ DEF_STD_CMD_A(CmdPartReverseShape);
CmdPartReverseShape::CmdPartReverseShape()
:Command("Part_ReverseShape")
{
sAppModule = "Part";
sGroup = QT_TR_NOOP("Part");
sMenuText = QT_TR_NOOP("Reverse shapes");
@ -1092,6 +1103,7 @@ CmdPartReverseShape::CmdPartReverseShape()
void CmdPartReverseShape::activated(int iMsg)
{
Q_UNUSED(iMsg);
std::vector<App::DocumentObject*> objs = Gui::Selection().getObjectsOfType
(Part::Feature::getClassTypeId());
runCommand(Doc, "import Part");
@ -1146,6 +1158,7 @@ CmdPartBoolean::CmdPartBoolean()
void CmdPartBoolean::activated(int iMsg)
{
Q_UNUSED(iMsg);
Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog();
if (!dlg)
dlg = new PartGui::TaskBooleanOperation();
@ -1176,6 +1189,7 @@ CmdPartExtrude::CmdPartExtrude()
void CmdPartExtrude::activated(int iMsg)
{
Q_UNUSED(iMsg);
Gui::Control().showDialog(new PartGui::TaskExtrusion());
}
@ -1202,6 +1216,7 @@ CmdPartMakeFace::CmdPartMakeFace()
void CmdPartMakeFace::activated(int iMsg)
{
Q_UNUSED(iMsg);
std::vector<Part::Part2DObject*> sketches = Gui::Selection().getObjectsOfType<Part::Part2DObject>();
openCommand("Make face");
@ -1252,6 +1267,7 @@ CmdPartRevolve::CmdPartRevolve()
void CmdPartRevolve::activated(int iMsg)
{
Q_UNUSED(iMsg);
Gui::Control().showDialog(new PartGui::TaskRevolution());
}
@ -1279,6 +1295,7 @@ CmdPartFillet::CmdPartFillet()
void CmdPartFillet::activated(int iMsg)
{
Q_UNUSED(iMsg);
Gui::Control().showDialog(new PartGui::TaskFilletEdges(0));
}
@ -1306,6 +1323,7 @@ CmdPartChamfer::CmdPartChamfer()
void CmdPartChamfer::activated(int iMsg)
{
Q_UNUSED(iMsg);
Gui::Control().showDialog(new PartGui::TaskChamferEdges(0));
}
@ -1333,6 +1351,7 @@ CmdPartMirror::CmdPartMirror()
void CmdPartMirror::activated(int iMsg)
{
Q_UNUSED(iMsg);
Gui::Control().showDialog(new PartGui::TaskMirroring());
}
@ -1360,6 +1379,7 @@ CmdPartCrossSections::CmdPartCrossSections()
void CmdPartCrossSections::activated(int iMsg)
{
Q_UNUSED(iMsg);
Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog();
if (!dlg) {
std::vector<App::DocumentObject*> obj = Gui::Selection().getObjectsOfType
@ -1399,6 +1419,7 @@ CmdPartBuilder::CmdPartBuilder()
void CmdPartBuilder::activated(int iMsg)
{
Q_UNUSED(iMsg);
Gui::Control().showDialog(new PartGui::TaskShapeBuilder());
}
@ -1427,6 +1448,7 @@ CmdPartLoft::CmdPartLoft()
void CmdPartLoft::activated(int iMsg)
{
Q_UNUSED(iMsg);
Gui::Control().showDialog(new PartGui::TaskLoft());
}
@ -1455,6 +1477,7 @@ CmdPartSweep::CmdPartSweep()
void CmdPartSweep::activated(int iMsg)
{
Q_UNUSED(iMsg);
Gui::Control().showDialog(new PartGui::TaskSweep());
}
@ -1483,6 +1506,7 @@ CmdPartOffset::CmdPartOffset()
void CmdPartOffset::activated(int iMsg)
{
Q_UNUSED(iMsg);
App::DocumentObject* shape = getSelection().getObjectsOfType(Part::Feature::getClassTypeId()).front();
std::string offset = getUniqueObjectName("Offset");
@ -1531,6 +1555,7 @@ CmdPartOffset2D::CmdPartOffset2D()
void CmdPartOffset2D::activated(int iMsg)
{
Q_UNUSED(iMsg);
App::DocumentObject* shape = getSelection().getObjectsOfType(Part::Feature::getClassTypeId()).front();
std::string offset = getUniqueObjectName("Offset2D");
@ -1671,6 +1696,7 @@ CmdPartThickness::CmdPartThickness()
void CmdPartThickness::activated(int iMsg)
{
Q_UNUSED(iMsg);
Gui::SelectionFilter faceFilter ("SELECT Part::Feature SUBELEMENT Face COUNT 1..");
if (!faceFilter.match()) {
QMessageBox::warning(Gui::getMainWindow(),
@ -1745,6 +1771,7 @@ CmdShapeInfo::CmdShapeInfo()
void CmdShapeInfo::activated(int iMsg)
{
Q_UNUSED(iMsg);
#if 0
static const char * const part_pipette[]={
"32 32 17 1",
@ -1844,6 +1871,7 @@ CmdPartRuledSurface::CmdPartRuledSurface()
void CmdPartRuledSurface::activated(int iMsg)
{
Q_UNUSED(iMsg);
bool ok = false;
TopoDS_Shape curve1, curve2;
std::string link1, link2, obj1, obj2;
@ -1959,6 +1987,7 @@ CmdCheckGeometry::CmdCheckGeometry()
void CmdCheckGeometry::activated(int iMsg)
{
Q_UNUSED(iMsg);
Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog();
if (!dlg)
dlg = new PartGui::TaskCheckGeometryDialog();
@ -1991,6 +2020,7 @@ CmdColorPerFace::CmdColorPerFace()
void CmdColorPerFace::activated(int iMsg)
{
Q_UNUSED(iMsg);
if (getActiveGuiDocument()->getInEdit())
getActiveGuiDocument()->resetEdit();
std::vector<App::DocumentObject*> sel = Gui::Selection().getObjectsOfType(Part::Feature::getClassTypeId());
@ -2028,6 +2058,7 @@ CmdMeasureLinear::CmdMeasureLinear()
void CmdMeasureLinear::activated(int iMsg)
{
Q_UNUSED(iMsg);
PartGui::goDimensionLinearRoot();
}
@ -2056,6 +2087,7 @@ CmdMeasureAngular::CmdMeasureAngular()
void CmdMeasureAngular::activated(int iMsg)
{
Q_UNUSED(iMsg);
PartGui::goDimensionAngularRoot();
}
@ -2084,6 +2116,7 @@ CmdMeasureClearAll::CmdMeasureClearAll()
void CmdMeasureClearAll::activated(int iMsg)
{
Q_UNUSED(iMsg);
PartGui::eraseAllDimensions();
}
@ -2112,6 +2145,7 @@ CmdMeasureToggleAll::CmdMeasureToggleAll()
void CmdMeasureToggleAll::activated(int iMsg)
{
Q_UNUSED(iMsg);
ParameterGrp::handle group = App::GetApplication().GetUserParameter().
GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("View");
bool visibility = group->GetBool("DimensionsVisible", true);
@ -2146,6 +2180,7 @@ CmdMeasureToggle3d::CmdMeasureToggle3d()
void CmdMeasureToggle3d::activated(int iMsg)
{
Q_UNUSED(iMsg);
PartGui::toggle3d();
}
@ -2174,6 +2209,7 @@ CmdMeasureToggleDelta::CmdMeasureToggleDelta()
void CmdMeasureToggleDelta::activated(int iMsg)
{
Q_UNUSED(iMsg);
PartGui::toggleDelta();
}

View File

@ -53,6 +53,7 @@ CmdPartCylinder::CmdPartCylinder()
void CmdPartCylinder::activated(int iMsg)
{
Q_UNUSED(iMsg);
QString cmd;
cmd = qApp->translate("CmdPartCylinder","Cylinder");
openCommand((const char*)cmd.toUtf8());
@ -93,6 +94,7 @@ CmdPartBox::CmdPartBox()
void CmdPartBox::activated(int iMsg)
{
Q_UNUSED(iMsg);
QString cmd;
cmd = qApp->translate("CmdPartBox","Cube");
openCommand((const char*)cmd.toUtf8());
@ -133,6 +135,7 @@ CmdPartSphere::CmdPartSphere()
void CmdPartSphere::activated(int iMsg)
{
Q_UNUSED(iMsg);
QString cmd;
cmd = qApp->translate("CmdPartSphere","Sphere");
openCommand((const char*)cmd.toUtf8());
@ -173,6 +176,7 @@ CmdPartCone::CmdPartCone()
void CmdPartCone::activated(int iMsg)
{
Q_UNUSED(iMsg);
QString cmd;
cmd = qApp->translate("CmdPartCone","Cone");
openCommand((const char*)cmd.toUtf8());
@ -213,6 +217,7 @@ CmdPartTorus::CmdPartTorus()
void CmdPartTorus::activated(int iMsg)
{
Q_UNUSED(iMsg);
QString cmd;
cmd = qApp->translate("CmdPartTorus","Torus");
openCommand((const char*)cmd.toUtf8());

View File

@ -64,6 +64,7 @@ CmdPartSimpleCylinder::CmdPartSimpleCylinder()
void CmdPartSimpleCylinder::activated(int iMsg)
{
Q_UNUSED(iMsg);
PartGui::DlgPartCylinderImp dlg(Gui::getMainWindow());
if (dlg.exec()== QDialog::Accepted) {
Base::Vector3d dir = dlg.getDirection();
@ -114,6 +115,7 @@ CmdPartShapeFromMesh::CmdPartShapeFromMesh()
void CmdPartShapeFromMesh::activated(int iMsg)
{
Q_UNUSED(iMsg);
bool ok;
double tol = QInputDialog::getDouble(Gui::getMainWindow(), QObject::tr("Sewing Tolerance"),
QObject::tr("Enter tolerance for sewing shape:"), 0.1, 0.01,10.0,2,&ok);
@ -176,6 +178,7 @@ CmdPartSimpleCopy::CmdPartSimpleCopy()
void CmdPartSimpleCopy::activated(int iMsg)
{
Q_UNUSED(iMsg);
Base::Type partid = Base::Type::fromName("Part::Feature");
std::vector<App::DocumentObject*> objs = Gui::Selection().getObjectsOfType(partid);
openCommand("Create Copy");
@ -221,6 +224,7 @@ CmdPartRefineShape::CmdPartRefineShape()
void CmdPartRefineShape::activated(int iMsg)
{
Q_UNUSED(iMsg);
Gui::WaitCursor wc;
Base::Type partid = Base::Type::fromName("Part::Feature");
std::vector<App::DocumentObject*> objs = Gui::Selection().getObjectsOfType(partid);

View File

@ -304,6 +304,8 @@ bool DlgBooleanOperation::indexOfCurrentItem(QTreeWidgetItem* item, int& top_ind
void DlgBooleanOperation::currentItemChanged(QTreeWidgetItem* current, QTreeWidgetItem * previous)
{
Q_UNUSED(current);
Q_UNUSED(previous);
// if (current && current->flags() & Qt::ItemIsUserCheckable)
// current->setCheckState(0, Qt::Checked);
//if (previous && previous->flags() & Qt::ItemIsUserCheckable)

View File

@ -67,7 +67,7 @@ public:
{
canSelect = false;
}
bool allow(App::Document* pDoc, App::DocumentObject* pObj, const char* sSubName)
bool allow(App::Document* /*pDoc*/, App::DocumentObject* pObj, const char* sSubName)
{
this->canSelect = false;
if (!pObj->isDerivedFrom(Part::Feature::getClassTypeId()))

View File

@ -184,7 +184,7 @@ namespace PartGui {
{
allowEdge = false;
}
bool allow(App::Document*pDoc, App::DocumentObject*pObj, const char*sSubName)
bool allow(App::Document* /*pDoc*/, App::DocumentObject*pObj, const char*sSubName)
{
if (pObj != this->object)
return false;

View File

@ -683,6 +683,7 @@ void DlgPrimitives::createPrimitive(const QString& placement)
Location::Location(QWidget* parent)
{
Q_UNUSED(parent);
mode = 0;
ui.setupUi(this);
}

View File

@ -70,7 +70,7 @@ public:
{
canSelect = false;
}
bool allow(App::Document*pDoc, App::DocumentObject*pObj, const char*sSubName)
bool allow(App::Document* /*pDoc*/, App::DocumentObject*pObj, const char*sSubName)
{
this->canSelect = false;
if (!pObj->isDerivedFrom(Part::Feature::getClassTypeId()))

View File

@ -148,7 +148,7 @@ void SoFCControlPoints::drawControlPoints(const SbVec3f * points,int32_t len) co
glEnd();
}
void SoFCControlPoints::generatePrimitives(SoAction* action)
void SoFCControlPoints::generatePrimitives(SoAction* /*action*/)
{
}

View File

@ -307,6 +307,7 @@ int ResultModel::rowCount(const QModelIndex &parent) const
int ResultModel::columnCount(const QModelIndex &parent) const
{
Q_UNUSED(parent);
return 3;
}

View File

@ -77,7 +77,7 @@ namespace PartGui {
: Gui::SelectionFilterGate((Gui::SelectionFilter*)0), object(obj)
{
}
bool allow(App::Document*pDoc, App::DocumentObject*pObj, const char*sSubName)
bool allow(App::Document* /*pDoc*/, App::DocumentObject*pObj, const char*sSubName)
{
if (pObj != this->object)
return false;
@ -161,7 +161,7 @@ public:
return false;
}
void addFacesToSelection(Gui::View3DInventorViewer* viewer,
void addFacesToSelection(Gui::View3DInventorViewer* /*viewer*/,
const Gui::ViewVolumeProjection& proj,
const Base::Polygon2D& polygon,
const TopoDS_Shape& shape)
@ -257,6 +257,7 @@ public:
FaceColors::FaceColors(ViewProviderPartExt* vp, QWidget* parent)
: d(new Private(vp))
{
Q_UNUSED(parent);
d->ui->setupUi(this);
d->ui->groupBox->setTitle(QString::fromUtf8(vp->getObject()->Label.getValue()));
d->ui->colorButton->setDisabled(true);

View File

@ -67,6 +67,7 @@ public:
LoftWidget::LoftWidget(QWidget* parent)
: d(new Private())
{
Q_UNUSED(parent);
Gui::Command::runCommand(Gui::Command::App, "from FreeCAD import Base");
Gui::Command::runCommand(Gui::Command::App, "import Part");

View File

@ -68,6 +68,7 @@ public:
OffsetWidget::OffsetWidget(Part::Offset* offset, QWidget* parent)
: d(new Private())
{
Q_UNUSED(parent);
Gui::Command::runCommand(Gui::Command::App, "from FreeCAD import Base");
Gui::Command::runCommand(Gui::Command::App, "import Part");

View File

@ -108,6 +108,7 @@ public:
ShapeBuilderWidget::ShapeBuilderWidget(QWidget* parent)
: d(new Private())
{
Q_UNUSED(parent);
d->ui.setupUi(this);
d->ui.label->setText(QString());
d->bg.addButton(d->ui.radioButtonEdgeFromVertex, 0);

View File

@ -81,7 +81,7 @@ public:
: Gui::SelectionFilterGate((Gui::SelectionFilter*)0)
{
}
bool allow(App::Document*pDoc, App::DocumentObject*pObj, const char*sSubName)
bool allow(App::Document* /*pDoc*/, App::DocumentObject*pObj, const char*sSubName)
{
if (pObj->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) {
if (!sSubName) {
@ -128,6 +128,7 @@ public:
SweepWidget::SweepWidget(QWidget* parent)
: d(new Private())
{
Q_UNUSED(parent);
Gui::Command::runCommand(Gui::Command::App, "from FreeCAD import Base");
Gui::Command::runCommand(Gui::Command::App, "import Part");

View File

@ -74,7 +74,7 @@ public:
: Gui::SelectionFilterGate((Gui::SelectionFilter*)0), object(obj)
{
}
bool allow(App::Document*pDoc, App::DocumentObject*pObj, const char*sSubName)
bool allow(App::Document* /*pDoc*/, App::DocumentObject*pObj, const char*sSubName)
{
if (pObj != this->object)
return false;
@ -91,6 +91,7 @@ public:
ThicknessWidget::ThicknessWidget(Part::Thickness* thickness, QWidget* parent)
: d(new Private())
{
Q_UNUSED(parent);
Gui::Command::runCommand(Gui::Command::App, "from FreeCAD import Base");
Gui::Command::runCommand(Gui::Command::App, "import Part");

View File

@ -80,10 +80,10 @@ void ViewProviderPart::applyColor(const Part::ShapeHistory& hist,
// ----------------------------------------------------------------------------
void ViewProviderShapeBuilder::buildNodes(const App::Property* prop, std::vector<SoNode*>& nodes) const
void ViewProviderShapeBuilder::buildNodes(const App::Property* , std::vector<SoNode*>& ) const
{
}
void ViewProviderShapeBuilder::createShape(const App::Property* prop, SoSeparator* coords) const
void ViewProviderShapeBuilder::createShape(const App::Property* , SoSeparator* ) const
{
}

View File

@ -633,7 +633,7 @@ std::vector<Base::Vector3d> ViewProviderPartExt::getModelPoints(const SoPickedPo
return std::vector<Base::Vector3d>();
}
std::vector<Base::Vector3d> ViewProviderPartExt::getSelectionShape(const char* Element) const
std::vector<Base::Vector3d> ViewProviderPartExt::getSelectionShape(const char* /*Element*/) const
{
return std::vector<Base::Vector3d>();
}

View File

@ -192,13 +192,13 @@ bool ViewProviderMirror::onDelete(const std::vector<std::string> &)
return true;
}
void ViewProviderMirror::dragStartCallback(void *data, SoDragger *)
void ViewProviderMirror::dragStartCallback(void *, SoDragger *)
{
// This is called when a manipulator is about to manipulating
Gui::Application::Instance->activeDocument()->openCommand("Edit Mirror");
}
void ViewProviderMirror::dragFinishCallback(void *data, SoDragger *)
void ViewProviderMirror::dragFinishCallback(void *, SoDragger *)
{
// This is called when a manipulator has done manipulating
Gui::Application::Instance->activeDocument()->commitCommand();

View File

@ -176,7 +176,7 @@ ViewProviderPartReference::~ViewProviderPartReference()
//pShapeHints->unref();
}
void ViewProviderPartReference::onChanged(const App::Property* prop)
void ViewProviderPartReference::onChanged(const App::Property* /*prop*/)
{
//if (prop == &LineWidth) {
// pcLineStyle->lineWidth = LineWidth.getValue();
@ -292,6 +292,6 @@ std::vector<std::string> ViewProviderPartReference::getDisplayModes(void) const
}
void ViewProviderPartReference::updateData(const App::Property* prop)
void ViewProviderPartReference::updateData(const App::Property* )
{
}