summaryrefslogtreecommitdiff
path: root/xmloff/source/core
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-09-04 12:02:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-09-04 19:21:07 +0200
commit41a46a306f40a7296c56bdeea0ba8a6d630aa15c (patch)
tree6dfa116917069cc48976ee005429f7da01028382 /xmloff/source/core
parent50238bddf0e95169007cb90479cca86849a19007 (diff)
dynamic_cast -> static_cast (tdf#130795)
the dynamic_cast is hot here, and none of these dynamic_casts are necessary, we already assert that they must succeed, so just use static_cast Change-Id: I88ade90431c4da4792c778b5cdab22332ed1c428 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121637 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/core')
-rw-r--r--xmloff/source/core/xmlimp.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index a4f709836427..ea5e88b47603 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -785,7 +785,7 @@ void SAL_CALL SvXMLImport::startFastElement (sal_Int32 Element,
const SvXMLImportContextRef & pHandler = maContexts.top();
SAL_INFO("xmloff.core", "calling createFastChildContext on " << typeid(*pHandler.get()).name());
auto tmp = pHandler->createFastChildContext( Element, Attribs );
- xContext = dynamic_cast<SvXMLImportContext*>(tmp.get());
+ xContext = static_cast<SvXMLImportContext*>(tmp.get());
assert((tmp && xContext) || (!tmp && !xContext));
}
else
@@ -823,7 +823,7 @@ void SAL_CALL SvXMLImport::startUnknownElement (const OUString & rNamespace, con
const SvXMLImportContextRef & pHandler = maContexts.top();
SAL_INFO("xmloff.core", "calling createUnknownChildContext on " << typeid(*pHandler.get()).name());
auto tmp = pHandler->createUnknownChildContext( rNamespace, rName, Attribs );
- xContext = dynamic_cast<SvXMLImportContext*>(tmp.get());
+ xContext = static_cast<SvXMLImportContext*>(tmp.get());
assert((tmp && xContext) || (!tmp && !xContext));
}
else