summaryrefslogtreecommitdiff
path: root/core/src/fxcrt/fx_basic_array.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-02-05 09:46:23 -0800
committerTom Sepez <tsepez@chromium.org>2015-02-05 09:46:23 -0800
commitdabc5d57bf473708295800a7991bc1fafdf76288 (patch)
tree9dfb8313596dd61e2c600cf02548b191f9753daf /core/src/fxcrt/fx_basic_array.cpp
parent7061d1af45752617fafa85e2242dc5b2844650b5 (diff)
downloadpdfium-dabc5d57bf473708295800a7991bc1fafdf76288.tar.xz
Add namespace and-re-arrange PDFium's local copy of chromium /base.
Any projects DEPS'd into chromium and requiring a /base subset should have a local copy of that subset in a separate namespace. This will avoid future naming conflicts. Re-arrange the directory structure to better identify what came from chromium's base, and to make drop-in replacement easier for files that contain hard-coded "base/" in their #include directives. R=jam@chromium.org Review URL: https://codereview.chromium.org/900753002
Diffstat (limited to 'core/src/fxcrt/fx_basic_array.cpp')
-rw-r--r--core/src/fxcrt/fx_basic_array.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/src/fxcrt/fx_basic_array.cpp b/core/src/fxcrt/fx_basic_array.cpp
index 0694cf9cbd..9bdc607bfe 100644
--- a/core/src/fxcrt/fx_basic_array.cpp
+++ b/core/src/fxcrt/fx_basic_array.cpp
@@ -5,7 +5,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "../../include/fxcrt/fx_basic.h"
-#include "../../../third_party/numerics/safe_math.h"
+#include "../../../third_party/base/numerics/safe_math.h"
CFX_BasicArray::CFX_BasicArray(int unit_size)
: m_pData(NULL)
@@ -32,7 +32,7 @@ FX_BOOL CFX_BasicArray::SetSize(int nNewSize)
}
if (m_pData == NULL) {
- base::CheckedNumeric<int> totalSize = nNewSize;
+ pdfium::base::CheckedNumeric<int> totalSize = nNewSize;
totalSize *= m_nUnitSize;
if (!totalSize.IsValid()) {
m_nSize = m_nMaxSize = 0;
@@ -51,7 +51,7 @@ FX_BOOL CFX_BasicArray::SetSize(int nNewSize)
m_nSize = nNewSize;
} else {
int nNewMax = nNewSize < m_nMaxSize ? m_nMaxSize : nNewSize;
- base::CheckedNumeric<int> totalSize = nNewMax;
+ pdfium::base::CheckedNumeric<int> totalSize = nNewMax;
totalSize *= m_nUnitSize;
if (!totalSize.IsValid() || nNewMax < m_nSize) {
return FALSE;
@@ -70,7 +70,7 @@ FX_BOOL CFX_BasicArray::SetSize(int nNewSize)
FX_BOOL CFX_BasicArray::Append(const CFX_BasicArray& src)
{
int nOldSize = m_nSize;
- base::CheckedNumeric<int> newSize = m_nSize;
+ pdfium::base::CheckedNumeric<int> newSize = m_nSize;
newSize += src.m_nSize;
if (m_nUnitSize != src.m_nUnitSize || !newSize.IsValid() || !SetSize(newSize.ValueOrDie())) {
return FALSE;