diff options
author | tsepez <tsepez@chromium.org> | 2016-04-08 09:00:35 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-08 09:00:35 -0700 |
commit | 8b36e5cc3d5f5f579c6b060e2c40b896a4b02bc0 (patch) | |
tree | f84a20d330d92b791d0322f424cb155816d77d1b /core/fxcrt/fx_extension.cpp | |
parent | 8da140e8747920057a2f2bbcf5c78e40bb198733 (diff) | |
download | pdfium-8b36e5cc3d5f5f579c6b060e2c40b896a4b02bc0.tar.xz |
Make CFX_WideString::FromLocal() take a CFX_ByteStringC arg
It doesn't persist the string beyond the duration of the
call, hence it should take the *StringC variant. Doing so
avoids some allocs by changing to the *StringC ctor in a few
places, at the cost of some explicit .ToByteStringC() calls
(which are cheap).
Review URL: https://codereview.chromium.org/1862953004
Diffstat (limited to 'core/fxcrt/fx_extension.cpp')
-rw-r--r-- | core/fxcrt/fx_extension.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fxcrt/fx_extension.cpp b/core/fxcrt/fx_extension.cpp index 7e8029baba..f1fd980120 100644 --- a/core/fxcrt/fx_extension.cpp +++ b/core/fxcrt/fx_extension.cpp @@ -134,7 +134,7 @@ FX_FLOAT FXSYS_strtof(const FX_CHAR* pcsStr, iLength = (int32_t)FXSYS_strlen(pcsStr); } CFX_WideString ws = - CFX_WideString::FromLocal(CFX_ByteString(pcsStr, iLength)); + CFX_WideString::FromLocal(CFX_ByteStringC(pcsStr, iLength)); return FXSYS_wcstof(ws.c_str(), iLength, pUsedLen); } FX_FLOAT FXSYS_wcstof(const FX_WCHAR* pwsStr, |