From 073797b6cff9947070077ff4b3cccc63059dc4e5 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 8 Aug 2017 13:24:36 -0400 Subject: Fold CFX_IsOnlyValue define into only usage Change-Id: I2cb20fd00436858f035f984fc104bae2c2d01057 Reviewed-on: https://pdfium-review.googlesource.com/9252 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- core/fxcrt/css/cfx_cssdatatable.h | 3 --- core/fxcrt/css/cfx_cssdeclaration.cpp | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/core/fxcrt/css/cfx_cssdatatable.h b/core/fxcrt/css/cfx_cssdatatable.h index b6188f93bb..9a0b0af198 100644 --- a/core/fxcrt/css/cfx_cssdatatable.h +++ b/core/fxcrt/css/cfx_cssdatatable.h @@ -15,9 +15,6 @@ #include "core/fxcrt/css/cfx_cssvalue.h" #include "core/fxcrt/fx_system.h" -#define CFX_IsOnlyValue(type, enum) \ - (((type) & ~(enum)) == CFX_CSSVALUETYPE_Primitive) - struct CFX_CSSPropertyTable { CFX_CSSProperty eName; const wchar_t* pszName; diff --git a/core/fxcrt/css/cfx_cssdeclaration.cpp b/core/fxcrt/css/cfx_cssdeclaration.cpp index b65429edb7..c89f75c5fd 100644 --- a/core/fxcrt/css/cfx_cssdeclaration.cpp +++ b/core/fxcrt/css/cfx_cssdeclaration.cpp @@ -205,7 +205,8 @@ void CFX_CSSDeclaration::AddProperty(const CFX_CSSPropertyTable* pTable, AddPropertyHolder(pTable->eName, pCSSValue, bImportant); return; } - if (CFX_IsOnlyValue(dwType, g_ValueGuessOrder[i])) + + if ((dwType & ~(g_ValueGuessOrder[i])) == CFX_CSSVALUETYPE_Primitive) return; } break; -- cgit v1.2.3