From: David Wells Date: Sat, 25 Jun 2016 21:30:21 +0000 (-0400) Subject: Make some temporary variables const. X-Git-Tag: v8.5.0-rc1~952^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65235b33d725449d2ea91065c1b20ca53c793493;p=dealii.git Make some temporary variables const. --- diff --git a/examples/step-25/step-25.cc b/examples/step-25/step-25.cc index 5ee224cf58..c7f18d23c2 100644 --- a/examples/step-25/step-25.cc +++ b/examples/step-25/step-25.cc @@ -193,15 +193,15 @@ namespace Step25 case 3: { - double theta = numbers::PI/4; - double phi = numbers::PI/4; - double tau = 1.; - double c0 = 1.; - double s = 1.; - double arg = p[0]*std::cos(theta) + - p[1]*std::sin(theta) * std::cos(phi) + - std::sin(theta) * std::sin(phi) * - (p[2]*std::cosh(tau)+t*std::sinh(tau)); + const double theta = numbers::PI/4; + const double phi = numbers::PI/4; + const double tau = 1.; + const double c0 = 1.; + const double s = 1.; + const double arg = p[0]*std::cos(theta) + + p[1]*std::sin(theta) * std::cos(phi) + + std::sin(theta) * std::sin(phi) * + (p[2]*std::cosh(tau)+t*std::sinh(tau)); return 4.*std::atan(c0*std::exp(s*arg)); }