From 660956f58af305d72c64bb87c05f694469846df2 Mon Sep 17 00:00:00 2001 From: tsepez Date: Wed, 6 Apr 2016 06:27:29 -0700 Subject: Rename CFX_WideStringC::raw_str() to c_str() No functional change intended. This difference in naming is standing in the way of consolidating some of the string code between Wide and Byte strings. The Wide code wants to call raw_str() in exactly the same spots that the Byte code calls c_str(). This makes sense, because in both places we get a character type back, and not a uint*_t type. If WideStringC had a raw_str() method, it would have to return uint32_t or similar. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1863593004 --- xfa/fxfa/parser/xfa_basic_imp.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'xfa/fxfa/parser/xfa_basic_imp.cpp') diff --git a/xfa/fxfa/parser/xfa_basic_imp.cpp b/xfa/fxfa/parser/xfa_basic_imp.cpp index 13c879a31e..07f1b82301 100644 --- a/xfa/fxfa/parser/xfa_basic_imp.cpp +++ b/xfa/fxfa/parser/xfa_basic_imp.cpp @@ -26,7 +26,7 @@ const XFA_PACKETINFO* XFA_GetPacketByName(const CFX_WideStringC& wsName) { if (iLength == 0) { return NULL; } - uint32_t uHash = FX_HashCode_String_GetW(wsName.raw_str(), iLength); + uint32_t uHash = FX_HashCode_String_GetW(wsName.c_str(), iLength); int32_t iStart = 0, iEnd = g_iXFAPacketCount - 1; do { int32_t iMid = (iStart + iEnd) / 2; @@ -68,7 +68,7 @@ const XFA_ATTRIBUTEENUMINFO* XFA_GetAttributeEnumByName( if (iLength == 0) { return NULL; } - uint32_t uHash = FX_HashCode_String_GetW(wsName.raw_str(), iLength); + uint32_t uHash = FX_HashCode_String_GetW(wsName.c_str(), iLength); int32_t iStart = 0, iEnd = g_iXFAEnumCount - 1; do { int32_t iMid = (iStart + iEnd) / 2; @@ -94,7 +94,7 @@ const XFA_ATTRIBUTEINFO* XFA_GetAttributeByName(const CFX_WideStringC& wsName) { if (iLength == 0) { return NULL; } - uint32_t uHash = FX_HashCode_String_GetW(wsName.raw_str(), iLength); + uint32_t uHash = FX_HashCode_String_GetW(wsName.c_str(), iLength); int32_t iStart = 0, iEnd = g_iXFAAttributeCount - 1; do { int32_t iMid = (iStart + iEnd) / 2; @@ -195,7 +195,7 @@ const XFA_ELEMENTINFO* XFA_GetElementByName(const CFX_WideStringC& wsName) { if (iLength == 0) { return NULL; } - uint32_t uHash = FX_HashCode_String_GetW(wsName.raw_str(), iLength); + uint32_t uHash = FX_HashCode_String_GetW(wsName.c_str(), iLength); int32_t iStart = 0, iEnd = g_iXFAElementCount - 1; do { int32_t iMid = (iStart + iEnd) / 2; @@ -380,7 +380,7 @@ const XFA_METHODINFO* XFA_GetMethodByName(XFA_ELEMENT eElement, iElementIndex = scriptIndex->wParentIndex; continue; } - uint32_t uHash = FX_HashCode_String_GetW(wsMethodName.raw_str(), iLength); + uint32_t uHash = FX_HashCode_String_GetW(wsMethodName.c_str(), iLength); int32_t iStart = scriptIndex->wMethodStart, iEnd = iStart + icount - 1; do { int32_t iMid = (iStart + iEnd) / 2; @@ -412,8 +412,7 @@ const XFA_SCRIPTATTRIBUTEINFO* XFA_GetScriptAttributeByName( iElementIndex = scriptIndex->wParentIndex; continue; } - uint32_t uHash = - FX_HashCode_String_GetW(wsAttributeName.raw_str(), iLength); + uint32_t uHash = FX_HashCode_String_GetW(wsAttributeName.c_str(), iLength); int32_t iStart = scriptIndex->wAttributeStart, iEnd = iStart + icount - 1; do { int32_t iMid = (iStart + iEnd) / 2; @@ -438,7 +437,7 @@ void CXFA_Measurement::Set(const CFX_WideStringC& wsMeasure) { } int32_t iUsedLen = 0; int32_t iOffset = (wsMeasure.GetAt(0) == L'=') ? 1 : 0; - FX_FLOAT fValue = FX_wcstof(wsMeasure.raw_str() + iOffset, + FX_FLOAT fValue = FX_wcstof(wsMeasure.c_str() + iOffset, wsMeasure.GetLength() - iOffset, &iUsedLen); XFA_UNIT eUnit = GetUnit(wsMeasure.Mid(iOffset + iUsedLen)); Set(fValue, eUnit); -- cgit v1.2.3