From 5a67fcd6397847189a6f21de28319dc0f546abd3 Mon Sep 17 00:00:00 2001 From: Elias Pipping <elias.pipping@fu-berlin.de> Date: Mon, 31 Oct 2011 14:31:08 +0100 Subject: [PATCH] Constness and references --- src/samplefunctional.hh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/samplefunctional.hh b/src/samplefunctional.hh index 9b7a7100..02fd5fc6 100644 --- a/src/samplefunctional.hh +++ b/src/samplefunctional.hh @@ -22,9 +22,9 @@ template <int dimension> class SampleFunctional { typedef MyNonlinearity<dimension> NonlinearityType; - SampleFunctional(SmallMatrix _A, SmallVector _b, - MyNonlinearity<dimension> _phi) - : A(_A), b(_b), phi(_phi) {} + SampleFunctional(SmallMatrix const &A, SmallVector const &b, + MyNonlinearity<dimension> const &phi) + : A(A), b(b), phi(phi) {} double operator()(const SmallVector v) const { SmallVector y; @@ -81,9 +81,9 @@ template <int dimension> class SampleFunctional { ret *= -1; } - SmallMatrix A; - SmallVector b; - NonlinearityType phi; + SmallMatrix const &A; + SmallVector const &b; + NonlinearityType const φ private: // Gradient of the smooth part -- GitLab