From 8e4c505ff6d82263183e9f812fcc7b45c1414f15 Mon Sep 17 00:00:00 2001 From: tsepez Date: Thu, 14 Apr 2016 13:42:44 -0700 Subject: Rename CFX_ByteTextBuf::GetByteString() to AsStringC(). Do the same for CFX_WideTextBuf as well. The name is confusing because these return CFX_ByteStringC, not CFX_ByteString. The AsStringC naming gives parallelism with the string types themselves, and may help to indicate that the result is only good for the lifetime of the object being operated upon. Review URL: https://codereview.chromium.org/1886263003 --- xfa/fxfa/fm2js/xfa_simpleexpression.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'xfa/fxfa/fm2js/xfa_simpleexpression.cpp') diff --git a/xfa/fxfa/fm2js/xfa_simpleexpression.cpp b/xfa/fxfa/fm2js/xfa_simpleexpression.cpp index b600b52ebd..f6c12ae64d 100644 --- a/xfa/fxfa/fm2js/xfa_simpleexpression.cpp +++ b/xfa/fxfa/fm2js/xfa_simpleexpression.cpp @@ -237,7 +237,7 @@ void CXFA_FMAssignExpression::ToJavaScript(CFX_WideTextBuf& javascript) { CFX_WideTextBuf tempExp1; m_pExp1->ToJavaScript(tempExp1); if (m_pExp1->GetOperatorToken() == TOKidentifier && - tempExp1.GetWideString() != FX_WSTRC(L"this")) { + tempExp1.AsStringC() != FX_WSTRC(L"this")) { javascript << FX_WSTRC(L"else\n{\n"); javascript << tempExp1; javascript << FX_WSTRC(L" = "); @@ -267,7 +267,7 @@ void CXFA_FMAssignExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) { CFX_WideTextBuf tempExp1; m_pExp1->ToJavaScript(tempExp1); if (m_pExp1->GetOperatorToken() == TOKidentifier && - tempExp1.GetWideString() != FX_WSTRC(L"this")) { + tempExp1.AsStringC() != FX_WSTRC(L"this")) { javascript << FX_WSTRC(L"else\n{\n"); javascript << RUNTIMEFUNCTIONRETURNVALUE; javascript << FX_WSTRC(L" = "); @@ -530,7 +530,7 @@ void CXFA_FMCallExpression::ToJavaScript(CFX_WideTextBuf& javascript) { javascript << funcName; javascript << FX_WSTRC(L"("); if (m_pArguments) { - uint32_t methodPara = IsMethodWithObjParam(funcName.GetWideString()); + uint32_t methodPara = IsMethodWithObjParam(funcName.AsStringC()); if (methodPara > 0) { for (int i = 0; i < m_pArguments->GetSize(); ++i) { if ((methodPara & (0x01 << i)) > 0) { @@ -568,12 +568,12 @@ void CXFA_FMCallExpression::ToJavaScript(CFX_WideTextBuf& javascript) { bool isEvalFunc = false; bool isExistsFunc = false; if (IsBuildInFunc(&funcName)) { - if (funcName.GetWideString() == FX_WSTRC(L"Eval")) { + if (funcName.AsStringC() == FX_WSTRC(L"Eval")) { isEvalFunc = true; javascript << FX_WSTRC(L"eval.call(this, "); javascript << gs_lpStrExpFuncName[CALL]; javascript << FX_WSTRC(L"Translate"); - } else if (funcName.GetWideString() == FX_WSTRC(L"Exists")) { + } else if (funcName.AsStringC() == FX_WSTRC(L"Exists")) { isExistsFunc = true; javascript << gs_lpStrExpFuncName[CALL]; javascript << funcName; -- cgit v1.2.3