Skip to content

Commit

Permalink
fix Coverity issues
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Sep 3, 2016
1 parent 04aa24e commit 9ed53fe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Mod/Path/Gui/Command.cpp
Expand Up @@ -44,7 +44,7 @@
// Path compound #####################################################################################################


DEF_STD_CMD_A(CmdPathCompound);
DEF_STD_CMD_A(CmdPathCompound)

CmdPathCompound::CmdPathCompound()
:Command("Path_Compound")
Expand All @@ -69,7 +69,7 @@ void CmdPathCompound::activated(int iMsg)
Path::Feature *pcPathObject;
for (std::vector<Gui::SelectionSingleton::SelObj>::const_iterator it=Sel.begin();it!=Sel.end();++it) {
if ((*it).pObject->getTypeId().isDerivedFrom(Path::Feature::getClassTypeId())) {
pcPathObject = dynamic_cast<Path::Feature*>((*it).pObject);
pcPathObject = static_cast<Path::Feature*>((*it).pObject);
cmd << "FreeCAD.activeDocument()." << pcPathObject->getNameInDocument() << ",";
} else {
Base::Console().Error("Only Path objects must be selected before running this command\n");
Expand Down Expand Up @@ -98,7 +98,7 @@ bool CmdPathCompound::isActive(void)
// Path Shape #####################################################################################################


DEF_STD_CMD_A(CmdPathShape);
DEF_STD_CMD_A(CmdPathShape)

CmdPathShape::CmdPathShape()
:Command("Path_Shape")
Expand All @@ -118,7 +118,7 @@ void CmdPathShape::activated(int iMsg)
std::vector<Gui::SelectionSingleton::SelObj> Sel = getSelection().getSelection();
if (Sel.size() == 1) {
if (Sel[0].pObject->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) {
Part::Feature *pcPartObject = dynamic_cast<Part::Feature*>(Sel[0].pObject);
Part::Feature *pcPartObject = static_cast<Part::Feature*>(Sel[0].pObject);
std::string FeatName = getUniqueObjectName("PathShape");
openCommand("Create Path Compound");
doCommand(Doc,"FreeCAD.activeDocument().addObject('Path::FeatureShape','%s')",FeatName.c_str());
Expand Down

0 comments on commit 9ed53fe

Please sign in to comment.