summaryrefslogtreecommitdiff
path: root/core/fpdfdoc
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-06-21 15:21:44 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-21 15:21:44 +0000
commita964f2a5ab09dc01d09fad78f940ee8e0e5c0c04 (patch)
tree8334a6a67d9fc8c61b215e0889920f7f1c4cfe04 /core/fpdfdoc
parent9c292fef316739f43730f11b9a2b6d3e4b725b54 (diff)
downloadpdfium-a964f2a5ab09dc01d09fad78f940ee8e0e5c0c04.tar.xz
Remove WideString::c_str() calls where possible.
Many of these cause a string duplication as we go from Widestring => c_str => Widestring Change-Id: I0dfa952e66f89138e719ff9200db3d9397839e28 Reviewed-on: https://pdfium-review.googlesource.com/35790 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfdoc')
-rw-r--r--core/fpdfdoc/cpdf_pagelabel.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/core/fpdfdoc/cpdf_pagelabel.cpp b/core/fpdfdoc/cpdf_pagelabel.cpp
index e6a7780a95..d6f9220c26 100644
--- a/core/fpdfdoc/cpdf_pagelabel.cpp
+++ b/core/fpdfdoc/cpdf_pagelabel.cpp
@@ -143,7 +143,5 @@ int32_t CPDF_PageLabel::GetPageByLabel(const ByteStringView& bsLabel) const {
}
int32_t CPDF_PageLabel::GetPageByLabel(const WideStringView& wsLabel) const {
- // TODO(tsepez): check usage of c_str() below.
- return GetPageByLabel(
- PDF_EncodeText(wsLabel.unterminated_c_str()).AsStringView());
+ return GetPageByLabel(PDF_EncodeText(WideString(wsLabel)).AsStringView());
}