diff options
author | Mohammed Abdul Azeem <azeemmysore@gmail.com> | 2017-08-12 00:02:32 +0530 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-08-14 10:36:42 +0200 |
commit | eee6d1a90dd74808fb7825102c4ee38ea4919cbf (patch) | |
tree | 50f10878a1111c3537e0922cf7485d2dd4f4a2cf | |
parent | 0c3bd1d482ece1f2217cc87069179161f6a5bb56 (diff) |
Using static_cast instead of dynamic_cast:
This is just a downcast and the object is always expected
to be SvXMLImportContext.
Change-Id: I755b6b366144d86104b1284fabe3dba74fb54452
Reviewed-on: https://gerrit.libreoffice.org/41063
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r-- | xmloff/source/core/xmlimp.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index c502d0d7e67e..d58cb4216139 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -843,8 +843,9 @@ void SAL_CALL SvXMLImport::startFastElement (sal_Int32 Element, maNamespaceHandler->addNSDeclAttributes( maNamespaceAttrList ); std::unique_ptr<SvXMLNamespaceMap> pRewindMap( processNSAttributes( maNamespaceAttrList.get() )); - SvXMLImportContext *pContext = dynamic_cast<SvXMLImportContext*>( xContext.get() ); - if( pContext && pRewindMap ) + assert( dynamic_cast<SvXMLImportContext*>( xContext.get() ) != nullptr ); + SvXMLImportContext *pContext = static_cast<SvXMLImportContext*>( xContext.get() ); + if (pRewindMap) pContext->PutRewindMap(std::move(pRewindMap)); maContexts.push(pContext); } |