Added "max" and "min" constants to the primitive types which represent the

largest and smallest representable values.  Accessible directly and via pTraits.
This commit is contained in:
henry
2009-01-23 08:35:29 +00:00
parent e78671dea4
commit 3be01b9e86
28 changed files with 120 additions and 24 deletions

View File

@ -319,10 +319,7 @@ Type max(const UList<Type>& f)
}
else
{
WarningIn("max(const UList<Type>&)")
<< "empty field, returning zero" << endl;
return pTraits<Type>::zero;
return pTraits<Type>::min;
}
}
@ -339,10 +336,7 @@ Type min(const UList<Type>& f)
}
else
{
WarningIn("min(const UList<Type>&)")
<< "empty field, returning zero" << endl;
return pTraits<Type>::zero;
return pTraits<Type>::max;
}
}