Fix warnings introduced in new PartDesign

Mostly unused wariables and compare of signed & unsigned
This commit is contained in:
Alexander Golubev
2015-11-10 16:58:27 +03:00
committed by Stefan Tröger
parent 81015b3f44
commit 0cfc0cd424
25 changed files with 60 additions and 87 deletions

View File

@@ -391,8 +391,6 @@ App::DocumentObjectExecReturn *Body::execute(void)
return new App::DocumentObjectExecReturn ( "Linked object is not a PartDesign feature" );
}
App::DocumentObject* link = Tip.getValue();
// get the shape of the tip
tipShape = static_cast<Part::Feature *>(tip)->Shape.getShape();

View File

@@ -74,10 +74,8 @@ short Loft::mustExecute() const
App::DocumentObjectExecReturn *Loft::execute(void)
{
Part::Part2DObject* sketch = 0;
std::vector<TopoDS_Wire> wires;
try {
sketch = getVerifiedSketch();
wires = getSketchWires();
} catch (const Base::Exception& e) {
return new App::DocumentObjectExecReturn(e.what());
@@ -116,7 +114,7 @@ App::DocumentObjectExecReturn *Loft::execute(void)
return new App::DocumentObjectExecReturn("Loft: All sections need to be part features");
TopExp_Explorer ex;
int i=0;
size_t i=0;
for (ex.Init(static_cast<Part::Feature*>(obj)->Shape.getValue(), TopAbs_WIRE); ex.More(); ex.Next(), ++i) {
if(i>=wiresections.size())
return new App::DocumentObjectExecReturn("Loft: Sections need to have the same amount of inner wires as the base section");

View File

@@ -212,8 +212,6 @@ App::DocumentObjectExecReturn *Pad::execute(void)
// set the additive shape property for later usage in e.g. pattern
prism = refineShapeIfActive(prism);
const char* name = AddSubShape.getName();
const char* name1 = this->getPropertyName(&AddSubShape);
this->AddSubShape.setValue(prism);
if (!base.IsNull()) {

View File

@@ -112,10 +112,8 @@ short Pipe::mustExecute() const
App::DocumentObjectExecReturn *Pipe::execute(void)
{
Part::Part2DObject* sketch = 0;
std::vector<TopoDS_Wire> wires;
try {
sketch = getVerifiedSketch();
wires = getSketchWires();
} catch (const Base::Exception& e) {
return new App::DocumentObjectExecReturn(e.what());
@@ -182,7 +180,7 @@ App::DocumentObjectExecReturn *Pipe::execute(void)
return new App::DocumentObjectExecReturn("All sections need to be part features");
TopExp_Explorer ex;
int i=0;
size_t i=0;
for (ex.Init(static_cast<Part::Feature*>(obj)->Shape.getValue(), TopAbs_WIRE); ex.More(); ex.Next()) {
wiresections[i].push_back(TopoDS::Wire(ex.Current()));
if(i>=wiresections.size())

View File

@@ -83,7 +83,7 @@ void ShapeBinder::getFilterdReferences(App::PropertyLinkSubList* prop, Part::Fea
}
//we only allow one part feature, so get the first one we find
int index = 0;
size_t index = 0;
while(!objs[index]->isDerivedFrom(Part::Feature::getClassTypeId()) && index < objs.size())
index++;