summaryrefslogtreecommitdiff
path: root/third_party/bigint/BigUnsigned.cc
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.cc
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.cc')
-rw-r--r--third_party/bigint/BigUnsigned.cc27
1 files changed, 0 insertions, 27 deletions
diff --git a/third_party/bigint/BigUnsigned.cc b/third_party/bigint/BigUnsigned.cc
index 863fadcb39..e38e4aa26d 100644
--- a/third_party/bigint/BigUnsigned.cc
+++ b/third_party/bigint/BigUnsigned.cc
@@ -195,12 +195,7 @@ void BigUnsigned::subtract(const BigUnsigned &a, const BigUnsigned &b) {
return;
} else if (a.len < b.len)
// If a is shorter than b, the result is negative.
-#ifdef FOXIT_CHROME_BUILD
abort();
-#else
- throw "BigUnsigned::subtract: "
- "Negative result in unsigned calculation";
-#endif
// Some variables...
bool borrowIn, borrowOut;
Blk temp;
@@ -233,11 +228,7 @@ void BigUnsigned::subtract(const BigUnsigned &a, const BigUnsigned &b) {
* predictable state. */
if (borrowIn) {
len = 0;
-#ifdef FOXIT_CHROME_BUILD
abort();
-#else
- throw "BigUnsigned::subtract: Negative result in unsigned calculation";
-#endif
} else
// Copy over the rest of the blocks
for (; i < a.len; i++)
@@ -400,11 +391,7 @@ void BigUnsigned::divideWithRemainder(const BigUnsigned &b, BigUnsigned &q) {
* It would be silly to try to write quotient and remainder to the
* same variable. Rule that out right away. */
if (this == &q)
-#ifdef FOXIT_CHROME_BUILD
abort();
-#else
- throw "BigUnsigned::divideWithRemainder: Cannot write quotient and remainder into the same variable";
-#endif
/* Now *this and q are separate, so the only concern is that b might be
* aliased to one of them. If so, use a temporary copy of b. */
if (this == &b || &q == &b) {
@@ -614,12 +601,7 @@ void BigUnsigned::bitShiftLeft(const BigUnsigned &a, int b) {
DTRT_ALIASED(this == &a, bitShiftLeft(a, b));
if (b < 0) {
if (b << 1 == 0)
-#ifdef FOXIT_CHROME_BUILD
abort();
-#else
- throw "BigUnsigned::bitShiftLeft: "
- "Pathological shift amount not implemented";
-#endif
else {
bitShiftRight(a, -b);
return;
@@ -644,12 +626,7 @@ void BigUnsigned::bitShiftRight(const BigUnsigned &a, int b) {
DTRT_ALIASED(this == &a, bitShiftRight(a, b));
if (b < 0) {
if (b << 1 == 0)
-#ifdef FOXIT_CHROME_BUILD
abort();
-#else
- throw "BigUnsigned::bitShiftRight: "
- "Pathological shift amount not implemented";
-#endif
else {
bitShiftLeft(a, -b);
return;
@@ -705,11 +682,7 @@ void BigUnsigned::operator ++(int) {
// Prefix decrement
void BigUnsigned::operator --() {
if (len == 0)
-#ifdef FOXIT_CHROME_BUILD
abort();
-#else
- throw "BigUnsigned::operator --(): Cannot decrement an unsigned zero";
-#endif
Index i;
bool borrow = true;
for (i = 0; borrow; i++) {