summaryrefslogtreecommitdiff
path: root/third_party/bigint/BigIntegerUtils.cc
diff options
context:
space:
mode:
authorBo Xu <bo_xu@foxitsoftware.com>2014-12-02 16:34:20 -0800
committerBo Xu <bo_xu@foxitsoftware.com>2014-12-02 16:34:20 -0800
commit91dd8c77ae849c22a8e4c9275e3f728b474b5be5 (patch)
tree79c1805c6a18ab234053f79fc4e10edabad5eef1 /third_party/bigint/BigIntegerUtils.cc
parent44047c3300d07192a67b1714084cc2d43b1e9bd9 (diff)
downloadpdfium-91dd8c77ae849c22a8e4c9275e3f728b474b5be5.tar.xz
Modify big integer library
This patch follows https://pdfium.googlesource.com/pdfium/+/44047c3300d07192a67b1714084cc2d43b1e9bd9 Modify the library to resolve compile error, add copyright notice and change pdfium.gyp and BUILD.gn R=tsepez@chromium.org Review URL: https://codereview.chromium.org/754743003
Diffstat (limited to 'third_party/bigint/BigIntegerUtils.cc')
-rw-r--r--third_party/bigint/BigIntegerUtils.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/third_party/bigint/BigIntegerUtils.cc b/third_party/bigint/BigIntegerUtils.cc
index 44073af652..fac8ac34b1 100644
--- a/third_party/bigint/BigIntegerUtils.cc
+++ b/third_party/bigint/BigIntegerUtils.cc
@@ -1,3 +1,9 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code by Matt McCutchen, see the LICENSE file.
+
#include "BigIntegerUtils.hh"
#include "BigUnsignedInABase.hh"
@@ -36,7 +42,11 @@ std::ostream &operator <<(std::ostream &os, const BigUnsigned &x) {
if (osFlags & os.showbase)
os << '0';
} else
+#ifdef FOXIT_CHROME_BUILD
+ abort();
+#else
throw "std::ostream << BigUnsigned: Could not determine the desired base from output-stream flags";
+#endif
std::string s = std::string(BigUnsignedInABase(x, base));
os << s;
return os;