From 56e04d2656bdd5f2b9448d857e8e73ab16aadf8e Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Tue, 21 Nov 2017 22:07:50 +0000 Subject: Avoid passing pointers by reference in core. This gets rid of most core/ non-const ref passing, either by passing by pointer-to-pointer instead, or by returning std::pair. Change-Id: Id7bdc355a1a725a05f9fa2f1e982ca8c975beef1 Reviewed-on: https://pdfium-review.googlesource.com/19030 Commit-Queue: Lei Zhang Reviewed-by: dsinclair --- core/fxcrt/css/cfx_cssdeclaration.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'core/fxcrt/css/cfx_cssdeclaration.cpp') diff --git a/core/fxcrt/css/cfx_cssdeclaration.cpp b/core/fxcrt/css/cfx_cssdeclaration.cpp index c44c878196..90bdf4e0ea 100644 --- a/core/fxcrt/css/cfx_cssdeclaration.cpp +++ b/core/fxcrt/css/cfx_cssdeclaration.cpp @@ -256,7 +256,7 @@ bool CFX_CSSDeclaration::ParseCSSColor(const wchar_t* pszValue, CFX_CSSPrimitiveType eType; CFX_CSSValueListParser list(pszValue + 4, iValueLen - 5, ','); for (int32_t i = 0; i < 3; ++i) { - if (!list.NextValue(eType, pszValue, iValueLen)) + if (!list.NextValue(&eType, &pszValue, &iValueLen)) return false; if (eType != CFX_CSSPrimitiveType::Number) return false; @@ -477,7 +477,7 @@ void CFX_CSSDeclaration::ParseValueListProperty( const uint32_t dwType = pTable->dwType; CFX_CSSPrimitiveType eType; std::vector> list; - while (parser.NextValue(eType, pszValue, iValueLen)) { + while (parser.NextValue(&eType, &pszValue, &iValueLen)) { switch (eType) { case CFX_CSSPrimitiveType::Number: if (dwType & CFX_CSSVALUETYPE_MaybeNumber) { @@ -596,7 +596,7 @@ bool CFX_CSSDeclaration::ParseBorderProperty( CFX_CSSValueListParser parser(pszValue, iValueLen, ' '); CFX_CSSPrimitiveType eType; - while (parser.NextValue(eType, pszValue, iValueLen)) { + while (parser.NextValue(&eType, &pszValue, &iValueLen)) { switch (eType) { case CFX_CSSPrimitiveType::Number: { if (pWidth) @@ -653,7 +653,7 @@ void CFX_CSSDeclaration::ParseFontProperty(const wchar_t* pszValue, RetainPtr pLineHeight; std::vector> familyList; CFX_CSSPrimitiveType eType; - while (parser.NextValue(eType, pszValue, iValueLen)) { + while (parser.NextValue(&eType, &pszValue, &iValueLen)) { switch (eType) { case CFX_CSSPrimitiveType::String: { const CFX_CSSPropertyValueTable* pValue = @@ -708,7 +708,7 @@ void CFX_CSSDeclaration::ParseFontProperty(const wchar_t* pszValue, familyList.push_back(pdfium::MakeRetain( WideString(pszValue, iValueLen))); } - parser.m_Separator = ','; + parser.UseCommaSeparator(); break; } case CFX_CSSPrimitiveType::Number: { -- cgit v1.2.3