summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fsdk_baseannot.cpp
diff options
context:
space:
mode:
authorWei Li <weili@chromium.org>2016-03-01 16:29:41 -0800
committerWei Li <weili@chromium.org>2016-03-01 16:29:41 -0800
commit0fc6b25e738c311fd66aa9da8c56de50af5644d5 (patch)
treee148556274b450ae125e2821debebb472f1ba8ee /fpdfsdk/src/fsdk_baseannot.cpp
parent738b08ce6b9f80d93b815411b47c2b11c2f090f6 (diff)
downloadpdfium-0fc6b25e738c311fd66aa9da8c56de50af5644d5.tar.xz
Remove implicit conversions and some cleanup
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1751753002 .
Diffstat (limited to 'fpdfsdk/src/fsdk_baseannot.cpp')
-rw-r--r--fpdfsdk/src/fsdk_baseannot.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/fpdfsdk/src/fsdk_baseannot.cpp b/fpdfsdk/src/fsdk_baseannot.cpp
index 132d30b857..bd73ee3211 100644
--- a/fpdfsdk/src/fsdk_baseannot.cpp
+++ b/fpdfsdk/src/fsdk_baseannot.cpp
@@ -892,9 +892,8 @@ CPDF_Action CPDFSDK_BAAnnot::GetAction() const {
}
void CPDFSDK_BAAnnot::SetAction(const CPDF_Action& action) {
- ASSERT(action);
- if ((CPDF_Action&)action !=
- CPDF_Action(m_pAnnot->GetAnnotDict()->GetDictBy("A"))) {
+ ASSERT(action.GetDict());
+ if (action.GetDict() != m_pAnnot->GetAnnotDict()->GetDictBy("A")) {
CPDF_Document* pDoc = m_pPageView->GetPDFDocument();
CPDF_Dictionary* pDict = action.GetDict();
if (pDict && pDict->GetObjNum() == 0) {
@@ -909,12 +908,12 @@ void CPDFSDK_BAAnnot::RemoveAction() {
}
CPDF_AAction CPDFSDK_BAAnnot::GetAAction() const {
- return m_pAnnot->GetAnnotDict()->GetDictBy("AA");
+ return CPDF_AAction(m_pAnnot->GetAnnotDict()->GetDictBy("AA"));
}
void CPDFSDK_BAAnnot::SetAAction(const CPDF_AAction& aa) {
- if ((CPDF_AAction&)aa != m_pAnnot->GetAnnotDict()->GetDictBy("AA"))
- m_pAnnot->GetAnnotDict()->SetAt("AA", (CPDF_AAction&)aa);
+ if (aa.GetDict() != m_pAnnot->GetAnnotDict()->GetDictBy("AA"))
+ m_pAnnot->GetAnnotDict()->SetAt("AA", aa.GetDict());
}
void CPDFSDK_BAAnnot::RemoveAAction() {