uLabel: Removed unnecessary checks for < 0

Resolves bug-report http://bugs.openfoam.org/view.php?id=2128
This commit is contained in:
Henry Weller 2016-06-21 11:05:04 +01:00
parent 04e56bfa6d
commit e6f4d41228

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -47,15 +47,6 @@ Foam::uLabel Foam::pow(uLabel a, uLabel b)
ans *= a;
}
#ifdef FULLDEBUG
if (b < 0)
{
FatalErrorInFunction
<< "negative value for b is not supported"
<< abort(FatalError);
}
#endif
return ans;
}
@ -69,10 +60,10 @@ Foam::uLabel Foam::factorial(uLabel n)
};
#ifdef FULLDEBUG
if (n > 12 && n < 0)
if (n > 12)
{
FatalErrorInFunction
<< "n value out of range"
<< "n value out of range (> 12)"
<< abort(FatalError);
}
#endif