From 9ed53fea3838b535df40bceedea8724fb5523987 Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 3 Sep 2016 12:35:34 +0200 Subject: [PATCH] fix Coverity issues --- src/Mod/Path/Gui/Command.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Mod/Path/Gui/Command.cpp b/src/Mod/Path/Gui/Command.cpp index a8f8262747..9c0f07374f 100644 --- a/src/Mod/Path/Gui/Command.cpp +++ b/src/Mod/Path/Gui/Command.cpp @@ -44,7 +44,7 @@ // Path compound ##################################################################################################### -DEF_STD_CMD_A(CmdPathCompound); +DEF_STD_CMD_A(CmdPathCompound) CmdPathCompound::CmdPathCompound() :Command("Path_Compound") @@ -69,7 +69,7 @@ void CmdPathCompound::activated(int iMsg) Path::Feature *pcPathObject; for (std::vector::const_iterator it=Sel.begin();it!=Sel.end();++it) { if ((*it).pObject->getTypeId().isDerivedFrom(Path::Feature::getClassTypeId())) { - pcPathObject = dynamic_cast((*it).pObject); + pcPathObject = static_cast((*it).pObject); cmd << "FreeCAD.activeDocument()." << pcPathObject->getNameInDocument() << ","; } else { Base::Console().Error("Only Path objects must be selected before running this command\n"); @@ -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") @@ -118,7 +118,7 @@ void CmdPathShape::activated(int iMsg) std::vector Sel = getSelection().getSelection(); if (Sel.size() == 1) { if (Sel[0].pObject->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) { - Part::Feature *pcPartObject = dynamic_cast(Sel[0].pObject); + Part::Feature *pcPartObject = static_cast(Sel[0].pObject); std::string FeatName = getUniqueObjectName("PathShape"); openCommand("Create Path Compound"); doCommand(Doc,"FreeCAD.activeDocument().addObject('Path::FeatureShape','%s')",FeatName.c_str());