From 2501ae2474c1f097a06634d647de2eb3fb730864 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 20 Nov 2017 21:19:13 +0000 Subject: Remove CXFA_DataData operator bool override This CL removes CXFA_DataData::operator bool in favour of an explicit HasValidNode method. This makes the call sites a lot clearer. Change-Id: I6fae14fdeec4674ca7916e21b9e5703070fc3069 Reviewed-on: https://pdfium-review.googlesource.com/18830 Commit-Queue: dsinclair Reviewed-by: Ryan Harrison --- xfa/fxfa/cxfa_ffrectangle.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'xfa/fxfa/cxfa_ffrectangle.cpp') diff --git a/xfa/fxfa/cxfa_ffrectangle.cpp b/xfa/fxfa/cxfa_ffrectangle.cpp index 855520e31d..716ef2e840 100644 --- a/xfa/fxfa/cxfa_ffrectangle.cpp +++ b/xfa/fxfa/cxfa_ffrectangle.cpp @@ -18,11 +18,12 @@ void CXFA_FFRectangle::RenderWidget(CXFA_Graphics* pGS, return; CXFA_ValueData valueData = m_pDataAcc->GetFormValueData(); - if (!valueData) + if (!valueData.HasValidNode()) return; CFX_RectF rect = GetRectWithoutRotate(); - if (CXFA_MarginData marginData = m_pDataAcc->GetMarginData()) + CXFA_MarginData marginData = m_pDataAcc->GetMarginData(); + if (marginData.HasValidNode()) XFA_RectWidthoutMargin(rect, marginData); CFX_Matrix mtRotate = GetRotateMatrix(); -- cgit v1.2.3