diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-01-11 14:11:41 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-11 14:11:41 +0000 |
commit | 382129e2bdb1337a5a82cbd96478aab02f9aff7d (patch) | |
tree | f0c4ffd0bd63a5a8180ac54fe06cff3794466a74 /xfa/fxfa/parser | |
parent | b5835183116559ea8225b7d8cc67c6f55bed7a1a (diff) | |
download | pdfium-382129e2bdb1337a5a82cbd96478aab02f9aff7d.tar.xz |
Rename GetCalculate to GetCalculateIfExists
This CL makes it explicit that GetCalculate can return nullptr.
Change-Id: I587e3bb442df3661f083f7058ff02a8d62478ed5
Reviewed-on: https://pdfium-review.googlesource.com/22681
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser')
-rw-r--r-- | xfa/fxfa/parser/cxfa_node.cpp | 4 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_node.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp index 093d83a67d..74263c7643 100644 --- a/xfa/fxfa/parser/cxfa_node.cpp +++ b/xfa/fxfa/parser/cxfa_node.cpp @@ -1604,7 +1604,7 @@ CXFA_Value* CXFA_Node::GetFormValue() const { return JSObject()->GetProperty<CXFA_Value>(0, XFA_Element::Value); } -CXFA_Calculate* CXFA_Node::GetCalculate() const { +CXFA_Calculate* CXFA_Node::GetCalculateIfExists() const { return JSObject()->GetProperty<CXFA_Calculate>(0, XFA_Element::Calculate); } @@ -1697,7 +1697,7 @@ int32_t CXFA_Node::ProcessCalculate(CXFA_FFDocView* docView) { if (GetElementType() == XFA_Element::Draw) return XFA_EVENTERROR_NotExist; - CXFA_Calculate* calc = GetCalculate(); + CXFA_Calculate* calc = GetCalculateIfExists(); if (!calc) return XFA_EVENTERROR_NotExist; if (IsUserInteractive()) diff --git a/xfa/fxfa/parser/cxfa_node.h b/xfa/fxfa/parser/cxfa_node.h index ed3b21d1e2..cafe6676fd 100644 --- a/xfa/fxfa/parser/cxfa_node.h +++ b/xfa/fxfa/parser/cxfa_node.h @@ -248,7 +248,7 @@ class CXFA_Node : public CXFA_Object { CXFA_Margin* GetMarginIfExists() const; CXFA_Para* GetParaIfExists() const; - CXFA_Calculate* GetCalculate() const; + CXFA_Calculate* GetCalculateIfExists() const; CXFA_Validate* GetValidate() const; CXFA_Validate* GetOrCreateValidate(); |