summaryrefslogtreecommitdiff
path: root/third_party/bigint/BigUnsigned.hh
diff options
context:
space:
mode:
authorJohn Abd-El-Malek <jam@chromium.org>2014-12-15 12:13:45 -0800
committerJohn Abd-El-Malek <jam@chromium.org>2014-12-15 12:13:45 -0800
commit207299b5d46e3e0612dd6a0264fb7647177312bb (patch)
tree796aeeeab94a2cac2676e3fb359078609c82f809 /third_party/bigint/BigUnsigned.hh
parent0d4fdc1bbf2c23999271617413f89f059d4a71c9 (diff)
downloadpdfium-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/BigUnsigned.hh')
-rw-r--r--third_party/bigint/BigUnsigned.hh31
1 files changed, 0 insertions, 31 deletions
diff --git a/third_party/bigint/BigUnsigned.hh b/third_party/bigint/BigUnsigned.hh
index accd4d6782..de4c18e066 100644
--- a/third_party/bigint/BigUnsigned.hh
+++ b/third_party/bigint/BigUnsigned.hh
@@ -267,11 +267,7 @@ inline BigUnsigned BigUnsigned::operator *(const BigUnsigned &x) const {
}
inline BigUnsigned BigUnsigned::operator /(const BigUnsigned &x) const {
if (x.isZero())
-#ifdef FOXIT_CHROME_BUILD
abort();
-#else
- throw "BigUnsigned::operator /: division by zero";
-#endif
BigUnsigned q, r;
r = *this;
r.divideWithRemainder(x, q);
@@ -279,11 +275,7 @@ inline BigUnsigned BigUnsigned::operator /(const BigUnsigned &x) const {
}
inline BigUnsigned BigUnsigned::operator %(const BigUnsigned &x) const {
if (x.isZero())
-#ifdef FOXIT_CHROME_BUILD
abort();
-#else
- throw "BigUnsigned::operator %: division by zero";
-#endif
BigUnsigned q, r;
r = *this;
r.divideWithRemainder(x, q);
@@ -326,11 +318,7 @@ inline void BigUnsigned::operator *=(const BigUnsigned &x) {
}
inline void BigUnsigned::operator /=(const BigUnsigned &x) {
if (x.isZero())
-#ifdef FOXIT_CHROME_BUILD
abort();
-#else
- throw "BigUnsigned::operator /=: division by zero";
-#endif
/* The following technique is slightly faster than copying *this first
* when x is large. */
BigUnsigned q;
@@ -340,11 +328,7 @@ inline void BigUnsigned::operator /=(const BigUnsigned &x) {
}
inline void BigUnsigned::operator %=(const BigUnsigned &x) {
if (x.isZero())
-#ifdef FOXIT_CHROME_BUILD
abort();
-#else
- throw "BigUnsigned::operator %=: division by zero";
-#endif
BigUnsigned q;
// Mods *this by x. Don't care about quotient left in q.
divideWithRemainder(x, q);
@@ -398,12 +382,7 @@ void BigUnsigned::initFromPrimitive(X x) {
template <class X>
void BigUnsigned::initFromSignedPrimitive(X x) {
if (x < 0)
-#ifdef FOXIT_CHROME_BUILD
abort();
-#else
- throw "BigUnsigned constructor: "
- "Cannot construct a BigUnsigned from a negative number";
-#endif
else
initFromPrimitive(x);
}
@@ -427,12 +406,7 @@ X BigUnsigned::convertToPrimitive() const {
return x;
// Otherwise fall through.
}
-#ifdef FOXIT_CHROME_BUILD
abort();
-#else
- throw "BigUnsigned::to<Primitive>: "
- "Value is too big to fit in the requested type";
-#endif
}
/* Wrap the above in an x >= 0 test to make sure we got a nonnegative result,
@@ -445,12 +419,7 @@ X BigUnsigned::convertToSignedPrimitive() const {
if (x >= 0)
return x;
else
-#ifdef FOXIT_CHROME_BUILD
abort();
-#else
- throw "BigUnsigned::to(Primitive): "
- "Value is too big to fit in the requested type";
-#endif
}
#endif