Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: fpdfsdk/src/fsdk_baseannot.cpp

Issue 1751753002: Remove implicit conversions and some cleanup (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/src/fsdk_actionhandler.cpp ('k') | fpdfsdk/src/fsdk_baseform.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fsdk_baseannot.cpp
diff --git a/fpdfsdk/src/fsdk_baseannot.cpp b/fpdfsdk/src/fsdk_baseannot.cpp
index 132d30b857409b9801ac7dc100aa2407cd7ecab3..bd73ee3211cc7fa84351c20d307cd0cbe5ac4f83 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() {
« no previous file with comments | « fpdfsdk/src/fsdk_actionhandler.cpp ('k') | fpdfsdk/src/fsdk_baseform.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698