Sketcher: Silence Coverity warning
Coverity CID 350580: Uninitialized scalar variable. The analyzer doesn't like the incomplete construction of the ConstraintId object (the 'Type' field was uninitialized).
This commit is contained in:
committed by
abdullahtahiriyo
parent
1483e28ffd
commit
e8dd1802f6
@@ -655,11 +655,14 @@ int SketchAnalysis::detectMissingEqualityConstraints(double precision)
|
||||
std::vector<Sketcher::Constraint*> constraint = sketch->Constraints.getValues();
|
||||
for (std::vector<Sketcher::Constraint*>::iterator it = constraint.begin(); it != constraint.end(); ++it) {
|
||||
if ((*it)->Type == Sketcher::Equal) {
|
||||
ConstraintIds id;
|
||||
id.First = (*it)->First;
|
||||
id.FirstPos = (*it)->FirstPos;
|
||||
id.Second = (*it)->Second;
|
||||
id.SecondPos = (*it)->SecondPos;
|
||||
ConstraintIds id {
|
||||
Base::Vector3d{},
|
||||
(*it)->First,
|
||||
(*it)->Second,
|
||||
(*it)->FirstPos,
|
||||
(*it)->SecondPos,
|
||||
(*it)->Type
|
||||
};
|
||||
|
||||
std::list<ConstraintIds>::iterator pos = std::find_if
|
||||
(equallines.begin(), equallines.end(), Constraint_Equal(id));
|
||||
|
||||
Reference in New Issue
Block a user