From 87bf7094a5a0b088aaab99f566bfdb537cbd0e0f Mon Sep 17 00:00:00 2001 From: wmayer Date: Wed, 13 Mar 2019 14:07:28 +0100 Subject: [PATCH] PVS: V601 The bool type is implicitly cast to the double type PVS: V668 There is no sense in testing pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error --- src/Mod/Part/App/PropertyTopoShape.cpp | 2 +- src/Mod/PartDesign/App/FeatureSketchBased.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mod/Part/App/PropertyTopoShape.cpp b/src/Mod/Part/App/PropertyTopoShape.cpp index d590a8553d..908f3b9c6b 100644 --- a/src/Mod/Part/App/PropertyTopoShape.cpp +++ b/src/Mod/Part/App/PropertyTopoShape.cpp @@ -185,7 +185,7 @@ PyObject *PropertyPartShape::getPyObject(void) } } - if (prop) prop->setConst(); + prop->setConst(); return prop; } diff --git a/src/Mod/PartDesign/App/FeatureSketchBased.cpp b/src/Mod/PartDesign/App/FeatureSketchBased.cpp index 61c8271b30..425d4cf149 100644 --- a/src/Mod/PartDesign/App/FeatureSketchBased.cpp +++ b/src/Mod/PartDesign/App/FeatureSketchBased.cpp @@ -925,7 +925,7 @@ double ProfileBased::getReversedAngle(const Base::Vector3d &b, const Base::Vecto return SketchNormal * cross; } catch (...) { - return Reversed.getValue(); + return Reversed.getValue() ? 1 : 0; } }