From 8b36e5cc3d5f5f579c6b060e2c40b896a4b02bc0 Mon Sep 17 00:00:00 2001 From: tsepez Date: Fri, 8 Apr 2016 09:00:35 -0700 Subject: 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 --- core/fxcrt/include/fx_string.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/fxcrt/include/fx_string.h') diff --git a/core/fxcrt/include/fx_string.h b/core/fxcrt/include/fx_string.h index 382e141dc2..8a0b3ff3db 100644 --- a/core/fxcrt/include/fx_string.h +++ b/core/fxcrt/include/fx_string.h @@ -497,8 +497,8 @@ class CFX_WideString { ~CFX_WideString(); - static CFX_WideString FromLocal(const CFX_ByteString& str); - static CFX_WideString FromCodePage(const CFX_ByteString& str, + static CFX_WideString FromLocal(const CFX_ByteStringC& str); + static CFX_WideString FromCodePage(const CFX_ByteStringC& str, uint16_t codepage); static CFX_WideString FromUTF8(const CFX_ByteStringC& str); -- cgit v1.2.3