From 6fe7d2174a47107578da912299c93b4dfb9f2add Mon Sep 17 00:00:00 2001 From: tsepez Date: Wed, 6 Apr 2016 10:51:14 -0700 Subject: Make CFX_WideString::FromUTF8() take a CFX_ByteStringC argument. Methods that take string arguments and do not persist them should take *StringC types as argument rather than discrete ptr/len args. Avoids a number of implicit casts from CFX_ByteString to char*. BUG= Review URL: https://codereview.chromium.org/1861183002 --- xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp') diff --git a/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp b/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp index 1b70dffb19..da19b381bb 100644 --- a/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp +++ b/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp @@ -74,7 +74,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_HWXY( if (iLength >= 2) { CFX_ByteString bsUnit = pArguments->GetUTF8String(1); if (!bsUnit.IsEmpty()) { - wsUnit = CFX_WideString::FromUTF8(bsUnit, bsUnit.GetLength()); + wsUnit = CFX_WideString::FromUTF8(bsUnit.AsByteStringC()); } } if (iLength >= 3) { @@ -367,7 +367,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_PageContent( } if (iLength >= 2) { CFX_ByteString bsType = pArguments->GetUTF8String(1); - wsType = CFX_WideString::FromUTF8(bsType, bsType.GetLength()); + wsType = CFX_WideString::FromUTF8(bsType.AsByteStringC()); } if (iLength >= 3) { bOnPageArea = pArguments->GetInt32(2) == 0 ? FALSE : TRUE; -- cgit v1.2.3