diff --git a/src/samplefunctional.hh b/src/samplefunctional.hh
index 28188fdb25ac3c6ebdd7f71ca19dedeb4dcd3746..4a6427fdb6613ee888133e889ff200242772455d 100644
--- a/src/samplefunctional.hh
+++ b/src/samplefunctional.hh
@@ -33,7 +33,8 @@ class SampleFunctional {
 
   void descentDirection(const SmallVector x, SmallVector &ret) const {
     if (x == SmallVector(0.0)) {
-      SmallVector d = smoothGradient(x);
+      SmallVector const d = smoothGradient(x);
+
       // Decline of the smooth part in the negative gradient direction
       double smoothDecline = -(d * d);
       double nonlinearDecline =