Fix compiler warnings:

fix [-Winconsistent-missing-override]
fix [-Wunused-lambda-capture]
fix [-Wunused-variable]
fix [-Wswitch]
This commit is contained in:
wmayer
2024-02-19 10:19:57 +01:00
committed by Chris Hennes
parent 1f6440b86e
commit 88b2cccc09
5 changed files with 9 additions and 11 deletions

View File

@@ -624,7 +624,7 @@ void AssemblyObject::removeUnconnectedJoints(std::vector<App::DocumentObject*>&
std::remove_if(
joints.begin(),
joints.end(),
[&connectedParts, this](App::DocumentObject* joint) {
[&connectedParts](App::DocumentObject* joint) {
App::DocumentObject* obj1 = getLinkObjFromProp(joint, "Part1");
App::DocumentObject* obj2 = getLinkObjFromProp(joint, "Part2");
if ((connectedParts.find(obj1) == connectedParts.end())
@@ -1073,8 +1073,6 @@ std::string AssemblyObject::handleOneSideOfJoint(App::DocumentObject* joint,
App::DocumentObject* obj = getObjFromNameProp(joint, propObjName, propPartName);
std::shared_ptr<ASMTPart> mbdPart = getMbDPart(part);
Base::Placement partPlc = getPlacementFromProp(part, "Placement");
Base::Placement objPlc = getPlacementFromProp(obj, "Placement");
Base::Placement plc = getPlacementFromProp(joint, propPlcName);
// Now we have plc which is the JCS placement, but its relative to the Object, not to the
// containing Part.

View File

@@ -44,9 +44,11 @@ public:
//@{
/// recalculate the Feature
short mustExecute() const override;
protected:
BRepAlgoAPI_BooleanOperation* makeOperation(const TopoDS_Shape&, const TopoDS_Shape&) const override;
virtual const char *opCode() const;
BRepAlgoAPI_BooleanOperation* makeOperation(const TopoDS_Shape&,
const TopoDS_Shape&) const override;
const char *opCode() const override;
//@}
};

View File

@@ -86,7 +86,7 @@ public:
const char* getViewProviderName() const override {
return "PartGui::ViewProviderLoft";
}
void setupObject();
void setupObject() override;
//@}
protected:
@@ -118,7 +118,7 @@ public:
const char* getViewProviderName() const override {
return "PartGui::ViewProviderSweep";
}
void setupObject();
void setupObject() override;
//@}
protected:

View File

@@ -1893,8 +1893,6 @@ protected:
void makeCts_1Point1Circle(bool& selAllowed, Base::Vector2d onSketchPos)
{
//Distance
const Part::Geometry* geom = Obj->getGeometry(selCircleArc[0].GeoId);
if (availableConstraint == AvailableConstraint::FIRST) {
restartCommand(QT_TRANSLATE_NOOP("Command", "Add length constraint"));
createDistanceConstrain(selPoints[0].GeoId, selPoints[0].PosId, selCircleArc[0].GeoId, selCircleArc[0].PosId, onSketchPos);
@@ -1986,8 +1984,6 @@ protected:
void makeCts_1Line1Circle(bool& selAllowed, Base::Vector2d onSketchPos)
{
//Distance
const Part::Geometry* geom = Obj->getGeometry(selCircleArc[0].GeoId);
if (availableConstraint == AvailableConstraint::FIRST) {
restartCommand(QT_TRANSLATE_NOOP("Command", "Add length constraint"));
createDistanceConstrain(selCircleArc[0].GeoId, selCircleArc[0].PosId, selLine[0].GeoId, selLine[0].PosId, onSketchPos); //Line second parameter

View File

@@ -1207,6 +1207,8 @@ bool ViewProviderSketch::mouseButtonPressed(int Button, bool pressed, const SbVe
Mode = STATUS_SELECT_Constraint;
}
}
default:
break;
}
}
else if (!pressed) {