Skip to content

Code quality: Possibility to declare some outparams as reference to const in some header files? #379

Open
@krishnakumarg1984

Description

@krishnakumarg1984

In proximal.h, static analysis flags that out can be declared as a reference to const.

  void operator()(Vector<T> &out, typename real_type<T>::type, Vector<T> const &x) const {
    return operator()(out, x);
  }

In relative_variation.h,

  RelativeVariation &tolerance(Real &e) const {
    tolerance_ = e;
    return *this;
  }

Parameter e can be declared as reference to const.


Any thoughts on these?

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