Skip to content

Possible bugs (dangling references) due to returning reference to temporary object in l1_proximal.h? #377

Open
@krishnakumarg1984

Description

@krishnakumarg1984

In l1_proximal.h, we have

Vector<Real> const &weights() const { return L1TightFrame<Scalar>::weights(); }

Similarly, in , we have

LinearTransform<Vector<Scalar>> const &Psi() const { return L1TightFrame<Scalar>::Psi(); }

Can we please have a closer look at this (first visually, and then maybe through unit tests)? This was flagged in static analysis that there functions are likely returning references to temporary objects (i.e. dangling references).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions