From: Wolfgang Bangerth Date: Tue, 7 Mar 2023 21:53:09 +0000 (-0700) Subject: Simplify a ?: expression. X-Git-Tag: v9.5.0-rc1~502^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=966939a70ed7ad11b7414881ce96585e4cebfd2b;p=dealii.git Simplify a ?: expression. --- diff --git a/examples/step-22/step-22.cc b/examples/step-22/step-22.cc index aac858b7ac..93096930d2 100644 --- a/examples/step-22/step-22.cc +++ b/examples/step-22/step-22.cc @@ -202,7 +202,15 @@ namespace Step22 ExcIndexRange(component, 0, this->n_components)); if (component == 0) - return (p[0] < 0 ? -1 : (p[0] > 0 ? 1 : 0)); + { + if (p[0] < 0) + return -1; + else if (p[0] > 0) + return 1; + else + return 0; + } + return 0; }