From 3b8e0a728aee36eda37a8aa13d694478f69c0ff3 Mon Sep 17 00:00:00 2001 From: schnetter <> Date: Thu, 12 Dec 2002 13:36:00 +0000 Subject: New function "ifthen" that is similar to the operator ?:, except both New function "ifthen" that is similar to the operator ?:, except both branches are evaluated. darcs-hash:20021212133644-07bb3-d7eeab0abe7cf68454cfc52390b676345d88117c.gz --- Carpet/CarpetLib/src/vect.hh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'Carpet') diff --git a/Carpet/CarpetLib/src/vect.hh b/Carpet/CarpetLib/src/vect.hh index 195dc3748..d08f93b2a 100644 --- a/Carpet/CarpetLib/src/vect.hh +++ b/Carpet/CarpetLib/src/vect.hh @@ -5,7 +5,7 @@ copyright : (C) 2000 by Erik Schnetter email : schnetter@astro.psu.edu - $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/vect.hh,v 1.11 2002/12/12 12:58:24 schnetter Exp $ + $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/vect.hh,v 1.12 2002/12/12 14:36:44 schnetter Exp $ ***************************************************************************/ @@ -419,13 +419,12 @@ public: return r; } -#if 0 - vect operator?: (const vect& a, const vect& b) const { - vect r(*this); - for (int d=0; d + vect ifthen (const vect& a, const vect& b) const { + vect r; + for (int d=0; d