From e39282627b9467d7761a75de053ea78f4d04dbb9 Mon Sep 17 00:00:00 2001 From: Henry Weller <http://cfd.direct> Date: Tue, 21 Jun 2016 11:05:04 +0100 Subject: [PATCH] uLabel: Removed unnecessary checks for < 0 Resolves bug-report http://bugs.openfoam.org/view.php?id=2128 --- src/OpenFOAM/primitives/ints/uLabel/uLabel.C | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/OpenFOAM/primitives/ints/uLabel/uLabel.C b/src/OpenFOAM/primitives/ints/uLabel/uLabel.C index f4aea858dd..75905f287e 100644 --- a/src/OpenFOAM/primitives/ints/uLabel/uLabel.C +++ b/src/OpenFOAM/primitives/ints/uLabel/uLabel.C @@ -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 -- GitLab