Skip to content

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

Open
@krishnakumarg1984

Description

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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