diff options
author | John Abd-El-Malek <jam@chromium.org> | 2014-12-15 12:13:45 -0800 |
---|---|---|
committer | John Abd-El-Malek <jam@chromium.org> | 2014-12-15 12:13:45 -0800 |
commit | 207299b5d46e3e0612dd6a0264fb7647177312bb (patch) | |
tree | 796aeeeab94a2cac2676e3fb359078609c82f809 /third_party/bigint/BigInteger.cc | |
parent | 0d4fdc1bbf2c23999271617413f89f059d4a71c9 (diff) | |
download | pdfium-207299b5d46e3e0612dd6a0264fb7647177312bb.tar.xz |
XFA: merge patch from issue 801913002 and 804463003
Simplify PDFium by removing code that's not used in the open source repo.
-remove parameter from FPDF_InitLibrary
-remove a bunch of ifdefs that are unused
Fix build after previous commit.
TBR=tsepez@chromium.org
BUG=
Review URL: https://codereview.chromium.org/809513002
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); |