summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_action.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-12-11 14:34:58 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-12-11 14:34:58 +0000
commit4ecf9a855205d33491adf59c86e81548321542ee (patch)
treee1222f087667ead2242c278067b94bf7a82ece62 /core/fpdfdoc/cpdf_action.cpp
parent69f2156c87da65a5e53e7d1197cec9c0ca431a40 (diff)
downloadpdfium-4ecf9a855205d33491adf59c86e81548321542ee.tar.xz
Get rid of default ctors for CPDF_Action and CPDF_AAction.
Change-Id: I45bac6e1b3fb9ae90feff1dc65c716beb2cab4c4 Reviewed-on: https://pdfium-review.googlesource.com/20771 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfdoc/cpdf_action.cpp')
-rw-r--r--core/fpdfdoc/cpdf_action.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/core/fpdfdoc/cpdf_action.cpp b/core/fpdfdoc/cpdf_action.cpp
index a3e2e23baf..383f328b9f 100644
--- a/core/fpdfdoc/cpdf_action.cpp
+++ b/core/fpdfdoc/cpdf_action.cpp
@@ -21,8 +21,6 @@ const char* const g_sATypes[] = {
} // namespace
-CPDF_Action::CPDF_Action() : CPDF_Action(nullptr) {}
-
CPDF_Action::CPDF_Action(CPDF_Dictionary* pDict) : m_pDict(pDict) {}
CPDF_Action::CPDF_Action(const CPDF_Action& that) = default;
@@ -128,14 +126,14 @@ size_t CPDF_Action::GetSubActionsCount() const {
CPDF_Action CPDF_Action::GetSubAction(size_t iIndex) const {
if (!m_pDict || !m_pDict->KeyExist("Next"))
- return CPDF_Action();
+ return CPDF_Action(nullptr);
CPDF_Object* pNext = m_pDict->GetDirectObjectFor("Next");
+ if (CPDF_Array* pArray = ToArray(pNext))
+ return CPDF_Action(pArray->GetDictAt(iIndex));
if (CPDF_Dictionary* pDict = ToDictionary(pNext)) {
if (iIndex == 0)
return CPDF_Action(pDict);
- } else if (CPDF_Array* pArray = ToArray(pNext)) {
- return CPDF_Action(pArray->GetDictAt(iIndex));
}
- return CPDF_Action();
+ return CPDF_Action(nullptr);
}