diff options
author | Lei Zhang <thestig@chromium.org> | 2017-11-21 22:07:50 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-11-21 22:07:50 +0000 |
commit | 56e04d2656bdd5f2b9448d857e8e73ab16aadf8e (patch) | |
tree | 57ed8ebed62f498bdd1fe010b0909f162bbcd29c /core/fxcrt/css/cfx_cssdeclaration.cpp | |
parent | ebe865db548f768038186054fc0f1eb024565c43 (diff) | |
download | pdfium-56e04d2656bdd5f2b9448d857e8e73ab16aadf8e.tar.xz |
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 <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxcrt/css/cfx_cssdeclaration.cpp')
-rw-r--r-- | core/fxcrt/css/cfx_cssdeclaration.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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<RetainPtr<CFX_CSSValue>> 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<CFX_CSSValue> pLineHeight; std::vector<RetainPtr<CFX_CSSValue>> 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<CFX_CSSStringValue>( WideString(pszValue, iValueLen))); } - parser.m_Separator = ','; + parser.UseCommaSeparator(); break; } case CFX_CSSPrimitiveType::Number: { |