Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
krishnakumarg1984 opened this issue Jun 22, 2023 · 0 comments

Comments

@krishnakumarg1984
Copy link
Collaborator

krishnakumarg1984 commented Jun 22, 2023

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?

@krishnakumarg1984 krishnakumarg1984 changed the title Code quality: Possibility to declare outparam as reference to const in proximal.h? Code quality: Possibility to declare some outparams as reference to const in some header files? Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant