Part: [skip ci] Fix coverity warning

Coverity warnings fixed:

CID 316522 (#2 of 2): Uninitialized scalar variable (UNINIT)
5. uninit_use_in_call: Using uninitialized value newSelection. Field newSelection.shapeType is uninitialized when calling push_back
This commit is contained in:
wmayer
2021-02-21 16:06:59 +01:00
parent b7bf4d40b6
commit 253bbb54ba

View File

@@ -538,6 +538,7 @@ void PartGui::TaskMeasureLinear::onSelectionChanged(const Gui::SelectionChanges&
if (msg.Type == Gui::SelectionChanges::AddSelection)
{
DimSelections::DimSelection newSelection;
newSelection.shapeType = DimSelections::None;
newSelection.documentName = msg.pDocName;
newSelection.objectName = msg.pObjectName;
newSelection.subObjectName = msg.pSubName;
@@ -557,6 +558,7 @@ void PartGui::TaskMeasureLinear::onSelectionChanged(const Gui::SelectionChanges&
if (msg.Type == Gui::SelectionChanges::AddSelection)
{
DimSelections::DimSelection newSelection;
newSelection.shapeType = DimSelections::None;
newSelection.documentName = msg.pDocName;
newSelection.objectName = msg.pObjectName;
newSelection.subObjectName = msg.pSubName;
@@ -1537,6 +1539,7 @@ void PartGui::TaskMeasureAngular::onSelectionChanged(const Gui::SelectionChanges
return;
mat.inverse();
DimSelections::DimSelection newSelection;
newSelection.shapeType = DimSelections::None;
newSelection.documentName = msg.pDocName;
newSelection.objectName = msg.pObjectName;
newSelection.subObjectName = msg.pSubName;