diff options
author | tsepez <tsepez@chromium.org> | 2016-09-13 06:46:40 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-09-13 06:46:40 -0700 |
commit | 067990ccf96ae962392a2dbacbfd8348dc4c7676 (patch) | |
tree | 5e6a1d32d1b19bc2f7ff4197693d8612737342fc /core/fpdfdoc/cpdf_variabletext.cpp | |
parent | bb8935e9def5ad865be613eebea597a77fc7c547 (diff) | |
download | pdfium-067990ccf96ae962392a2dbacbfd8348dc4c7676.tar.xz |
Stop converting widestring -> c_str -> widestring in several places.
Avoids a needless alloc and copy.
Review-Url: https://codereview.chromium.org/2338553002
Diffstat (limited to 'core/fpdfdoc/cpdf_variabletext.cpp')
-rw-r--r-- | core/fpdfdoc/cpdf_variabletext.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/core/fpdfdoc/cpdf_variabletext.cpp b/core/fpdfdoc/cpdf_variabletext.cpp index 040b7e6051..12cf274321 100644 --- a/core/fpdfdoc/cpdf_variabletext.cpp +++ b/core/fpdfdoc/cpdf_variabletext.cpp @@ -394,9 +394,8 @@ CPVT_WordPlace CPDF_VariableText::BackSpaceWord(const CPVT_WordPlace& place) { return ClearLeftWord(AdjustLineHeader(place, TRUE)); } -void CPDF_VariableText::SetText(const FX_WCHAR* text) { +void CPDF_VariableText::SetText(const CFX_WideString& swText) { DeleteWords(CPVT_WordRange(GetBeginWordPlace(), GetEndWordPlace())); - CFX_WideString swText = text; CPVT_WordPlace wp(0, 0, -1); CPVT_SectionInfo secinfo; if (CSection* pSection = m_SectionArray.GetAt(0)) |