diff options
Diffstat (limited to 'third_party/bigint/BigInteger.cc')
-rw-r--r-- | third_party/bigint/BigInteger.cc | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/third_party/bigint/BigInteger.cc b/third_party/bigint/BigInteger.cc index bac578f974..93b57e4255 100644 --- a/third_party/bigint/BigInteger.cc +++ b/third_party/bigint/BigInteger.cc @@ -20,11 +20,7 @@ BigInteger::BigInteger(const Blk *b, Index blen, Sign s) : mag(b, blen) { switch (s) { case zero: if (!mag.isZero()) -#ifdef FOXIT_CHROME_BUILD abort(); -#else - throw "BigInteger::BigInteger(const Blk *, Index, Sign): Cannot use a sign of zero with a nonzero magnitude"; -#endif sign = zero; break; case positive: @@ -35,11 +31,7 @@ BigInteger::BigInteger(const Blk *b, Index blen, Sign s) : mag(b, blen) { default: /* g++ seems to be optimizing out this case on the assumption * that the sign is a valid member of the enumeration. Oh well. */ -#ifdef FOXIT_CHROME_BUILD abort(); -#else - throw "BigInteger::BigInteger(const Blk *, Index, Sign): Invalid sign"; -#endif } } @@ -47,11 +39,7 @@ BigInteger::BigInteger(const BigUnsigned &x, Sign s) : mag(x) { switch (s) { case zero: if (!mag.isZero()) -#ifdef FOXIT_CHROME_BUILD abort(); -#else - throw "BigInteger::BigInteger(const BigUnsigned &, Sign): Cannot use a sign of zero with a nonzero magnitude"; -#endif sign = zero; break; case positive: @@ -62,11 +50,7 @@ BigInteger::BigInteger(const BigUnsigned &x, Sign s) : mag(x) { default: /* g++ seems to be optimizing out this case on the assumption * that the sign is a valid member of the enumeration. Oh well. */ -#ifdef FOXIT_CHROME_BUILD abort(); -#else - throw "BigInteger::BigInteger(const BigUnsigned &, Sign): Invalid sign"; -#endif } } @@ -114,12 +98,7 @@ inline X convertBigUnsignedToPrimitiveAccess(const BigUnsigned &a) { template <class X> X BigInteger::convertToUnsignedPrimitive() const { if (sign == negative) -#ifdef FOXIT_CHROME_BUILD abort(); -#else - throw "BigInteger::to<Primitive>: " - "Cannot convert a negative integer to an unsigned type"; -#endif else return convertBigUnsignedToPrimitiveAccess<X>(mag); } @@ -146,12 +125,7 @@ X BigInteger::convertToSignedPrimitive() const { } // Otherwise fall through. } -#ifdef FOXIT_CHROME_BUILD abort(); -#else - throw "BigInteger::to<Primitive>: " - "Value is too big to fit in the requested type"; -#endif } unsigned long BigInteger::toUnsignedLong () const { return convertToUnsignedPrimitive<unsigned long > (); } @@ -179,11 +153,7 @@ BigInteger::CmpRes BigInteger::compareTo(const BigInteger &x) const { // Compare the magnitudes, but return the opposite result return CmpRes(-mag.compareTo(x.mag)); default: -#ifdef FOXIT_CHROME_BUILD abort(); -#else - throw "BigInteger internal error"; -#endif } } @@ -315,11 +285,7 @@ void BigInteger::divideWithRemainder(const BigInteger &b, BigInteger &q) { // Defend against aliased calls; // same idea as in BigUnsigned::divideWithRemainder . if (this == &q) -#ifdef FOXIT_CHROME_BUILD abort(); -#else - throw "BigInteger::divideWithRemainder: Cannot write quotient and remainder into the same variable"; -#endif if (this == &b || &q == &b) { BigInteger tmpB(b); divideWithRemainder(tmpB, q); |