diff options
author | John Abd-El-Malek <jam@chromium.org> | 2014-12-12 17:47:56 -0800 |
---|---|---|
committer | John Abd-El-Malek <jam@chromium.org> | 2014-12-12 17:47:56 -0800 |
commit | f6505100fc132ef866adaf3ff1fb7f06d0ca7a9b (patch) | |
tree | 73497690daaf5c7f810a4c2a8fa1047c59f738a0 /third_party/bigint/BigInteger.cc | |
parent | 217ecf3b39f8d5c01260684848a8886c8ed2bf89 (diff) | |
download | pdfium-f6505100fc132ef866adaf3ff1fb7f06d0ca7a9b.tar.xz |
Fix build after previous commit.chromium/2255chromium/2254chromium/2253chromium/2252chromium/2251
TBR=tsepez
Review URL: https://codereview.chromium.org/804463003
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); |