+ fix some warnings

This commit is contained in:
wmayer 2015-05-30 20:59:25 +02:00
parent 351e7aae6f
commit a12f700aa2
2 changed files with 5 additions and 4 deletions

View File

@ -131,19 +131,20 @@ void Constraint::Restore(XMLReader &reader)
AlignmentType = (InternalAlignmentType) reader.getAttributeAsInteger("InternalAlignmentType"); AlignmentType = (InternalAlignmentType) reader.getAttributeAsInteger("InternalAlignmentType");
else else
AlignmentType = Undef; AlignmentType = Undef;
// read the third geo group if present // read the third geo group if present
if (reader.hasAttribute("Third")) { if (reader.hasAttribute("Third")) {
Third = reader.getAttributeAsInteger("Third"); Third = reader.getAttributeAsInteger("Third");
ThirdPos = (PointPos) reader.getAttributeAsInteger("ThirdPos"); ThirdPos = (PointPos) reader.getAttributeAsInteger("ThirdPos");
} }
// Read the distance a constraint label has been moved // Read the distance a constraint label has been moved
if (reader.hasAttribute("LabelDistance")) if (reader.hasAttribute("LabelDistance"))
LabelDistance = (float)reader.getAttributeAsFloat("LabelDistance"); LabelDistance = (float)reader.getAttributeAsFloat("LabelDistance");
if (reader.hasAttribute("LabelPosition")) if (reader.hasAttribute("LabelPosition"))
LabelPosition = (float)reader.getAttributeAsFloat("LabelPosition"); LabelPosition = (float)reader.getAttributeAsFloat("LabelPosition");
if (reader.hasAttribute("IsDriving")) if (reader.hasAttribute("IsDriving"))
isDriving = (bool)reader.getAttributeAsInteger("IsDriving"); isDriving = reader.getAttributeAsInteger("IsDriving") ? true : false;
} }

View File

@ -3476,7 +3476,7 @@ void CmdSketcherToggleDrivingConstraint::activated(int iMsg)
// issue the actual commands to toggle // issue the actual commands to toggle
doCommand(Doc,"App.ActiveDocument.%s.toggleDriving(%d) ",selection[0].getFeatName(),ConstrId); doCommand(Doc,"App.ActiveDocument.%s.toggleDriving(%d) ",selection[0].getFeatName(),ConstrId);
} }
catch(const Base::Exception& e) { catch(const Base::Exception&) {
succesful--; succesful--;
} }
} }