Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1810)

Unified Diff: core/src/fxcrt/fx_basic_array.cpp

Issue 900753002: Add namespace and re-arrange PDFium's local copy of chromium /base. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/src/fxcrt/fx_basic_array.cpp
diff --git a/core/src/fxcrt/fx_basic_array.cpp b/core/src/fxcrt/fx_basic_array.cpp
index 0694cf9cbd0a190b65b7b643700d355785d55c0d..3c13d53757d967d63e6610fc6976c4f55fa2270c 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;
+ third_party::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;
+ third_party::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;
+ third_party::base::CheckedNumeric<int> newSize = m_nSize;
newSize += src.m_nSize;
if (m_nUnitSize != src.m_nUnitSize || !newSize.IsValid() || !SetSize(newSize.ValueOrDie())) {
return FALSE;

Powered by Google App Engine
This is Rietveld 408576698