Skip to content

Commit

Permalink
Don't return a temp reference!!
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael McLeod committed Jan 9, 2024
1 parent aff60be commit 7dcf03f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cpp/sopt/real_indicator.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ class RealIndicator : public NonDifferentiableFunc<SCALAR>
// should not be used in this case
t_LinearTransform const &Psi() const override
{
return sopt::linear_transform_identity<SCALAR>();
return linear_operator;
}

t_LinearTransform linear_operator = sopt::linear_transform_identity<SCALAR>();
};

template<>
Expand Down

0 comments on commit 7dcf03f

Please sign in to comment.