summaryrefslogtreecommitdiff
path: root/core/fpdfdoc
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-04-13 15:41:21 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-13 15:41:21 -0700
commitb4c9f3f04673753da30011e9f1282cd5d1fa0f40 (patch)
tree9890d43409c8d60b1041de921c961067907419fb /core/fpdfdoc
parentcdce75706de7e76e73550a0582e1fd28af324fd0 (diff)
downloadpdfium-b4c9f3f04673753da30011e9f1282cd5d1fa0f40.tar.xz
Remove implicit cast from CFX_ByteString to (const char*).
BUG= Review URL: https://codereview.chromium.org/1885973002
Diffstat (limited to 'core/fpdfdoc')
-rw-r--r--core/fpdfdoc/doc_basic.cpp2
-rw-r--r--core/fpdfdoc/doc_form.cpp4
-rw-r--r--core/fpdfdoc/doc_utils.cpp4
3 files changed, 5 insertions, 5 deletions
diff --git a/core/fpdfdoc/doc_basic.cpp b/core/fpdfdoc/doc_basic.cpp
index e0b71df392..6d6e5c234f 100644
--- a/core/fpdfdoc/doc_basic.cpp
+++ b/core/fpdfdoc/doc_basic.cpp
@@ -511,7 +511,7 @@ int32_t CPDF_PageLabel::GetPageByLabel(const CFX_ByteStringC& bsLabel) const {
}
}
bsLbl = bsOrig;
- int nPage = FXSYS_atoi(bsLbl);
+ int nPage = FXSYS_atoi(bsLbl.c_str());
if (nPage > 0 && nPage <= nPages) {
return nPage;
}
diff --git a/core/fpdfdoc/doc_form.cpp b/core/fpdfdoc/doc_form.cpp
index 207b824545..6ca40fdaf6 100644
--- a/core/fpdfdoc/doc_form.cpp
+++ b/core/fpdfdoc/doc_form.cpp
@@ -633,11 +633,11 @@ FX_BOOL CPDF_InterForm::ValidateFieldName(const CPDF_FormControl* pControl,
}
int CPDF_InterForm::CompareFieldName(const CFX_ByteString& name1,
const CFX_ByteString& name2) {
- const FX_CHAR* ptr1 = name1;
- const FX_CHAR* ptr2 = name2;
if (name1.GetLength() == name2.GetLength()) {
return name1 == name2 ? 1 : 0;
}
+ const FX_CHAR* ptr1 = name1.c_str();
+ const FX_CHAR* ptr2 = name2.c_str();
int i = 0;
while (ptr1[i] == ptr2[i]) {
i++;
diff --git a/core/fpdfdoc/doc_utils.cpp b/core/fpdfdoc/doc_utils.cpp
index 404353847f..2df7d97e31 100644
--- a/core/fpdfdoc/doc_utils.cpp
+++ b/core/fpdfdoc/doc_utils.cpp
@@ -603,8 +603,8 @@ void AddInterFormFont(CPDF_Dictionary*& pFormDict,
csNameTag = pFont->GetBaseFont();
}
csNameTag.Remove(' ');
- csNameTag =
- CPDF_InterForm::GenerateNewResourceName(pDR, "Font", 4, csNameTag);
+ csNameTag = CPDF_InterForm::GenerateNewResourceName(pDR, "Font", 4,
+ csNameTag.c_str());
pFonts->SetAtReference(csNameTag.AsStringC(), pDocument,
pFont->GetFontDict());
}