summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Reichold <adam.reichold@t-online.de>2020-03-14 14:49:17 +0100
committerAdam Reichold <adam.reichold@t-online.de>2020-03-14 14:49:17 +0100
commit68b6dd2ecd868c1a757cb8b9273e2e26687e5229 (patch)
treeb235f0ef0cf92222901d2e2437d3788dac23b879
parentaf5565087b63aebfbb20a155dd9318312f688f92 (diff)
Replace dynamic_cast by static_cast where we already perform the type checks explicitly before downcasting.
-rw-r--r--glib/poppler-action.cc18
-rw-r--r--utils/HtmlOutputDev.cc2
2 files changed, 10 insertions, 10 deletions
diff --git a/glib/poppler-action.cc b/glib/poppler-action.cc
index 583efb53..2fcbb05d 100644
--- a/glib/poppler-action.cc
+++ b/glib/poppler-action.cc
@@ -627,39 +627,39 @@ _poppler_action_new (PopplerDocument *document,
switch (link->getKind ()) {
case actionGoTo:
action->type = POPPLER_ACTION_GOTO_DEST;
- build_goto_dest (document, action, dynamic_cast <const LinkGoTo *> (link));
+ build_goto_dest (document, action, static_cast <const LinkGoTo *> (link));
break;
case actionGoToR:
action->type = POPPLER_ACTION_GOTO_REMOTE;
- build_goto_remote (action, dynamic_cast <const LinkGoToR *> (link));
+ build_goto_remote (action, static_cast <const LinkGoToR *> (link));
break;
case actionLaunch:
action->type = POPPLER_ACTION_LAUNCH;
- build_launch (action, dynamic_cast <const LinkLaunch *> (link));
+ build_launch (action, static_cast <const LinkLaunch *> (link));
break;
case actionURI:
action->type = POPPLER_ACTION_URI;
- build_uri (action, dynamic_cast <const LinkURI *> (link));
+ build_uri (action, static_cast <const LinkURI *> (link));
break;
case actionNamed:
action->type = POPPLER_ACTION_NAMED;
- build_named (action, dynamic_cast <const LinkNamed *> (link));
+ build_named (action, static_cast <const LinkNamed *> (link));
break;
case actionMovie:
action->type = POPPLER_ACTION_MOVIE;
- build_movie (document, action, dynamic_cast<const LinkMovie*> (link));
+ build_movie (document, action, static_cast<const LinkMovie*> (link));
break;
case actionRendition:
action->type = POPPLER_ACTION_RENDITION;
- build_rendition (action, dynamic_cast<const LinkRendition*> (link));
+ build_rendition (action, static_cast<const LinkRendition*> (link));
break;
case actionOCGState:
action->type = POPPLER_ACTION_OCG_STATE;
- build_ocg_state (document, action, dynamic_cast<const LinkOCGState*> (link));
+ build_ocg_state (document, action, static_cast<const LinkOCGState*> (link));
break;
case actionJavaScript:
action->type = POPPLER_ACTION_JAVASCRIPT;
- build_javascript (action, dynamic_cast<const LinkJavaScript*> (link));
+ build_javascript (action, static_cast<const LinkJavaScript*> (link));
break;
case actionUnknown:
default:
diff --git a/utils/HtmlOutputDev.cc b/utils/HtmlOutputDev.cc
index 5be687ab..77b600ca 100644
--- a/utils/HtmlOutputDev.cc
+++ b/utils/HtmlOutputDev.cc
@@ -1839,7 +1839,7 @@ int HtmlOutputDev::getOutlinePageNum(OutlineItem *item)
if (!action || action->getKind() != actionGoTo)
return pagenum;
- link = dynamic_cast<const LinkGoTo*>(action);
+ link = static_cast<const LinkGoTo*>(action);
if (!link || !link->isOk())
return pagenum;