Kaydet (Commit) eee6d1a9 authored tarafından Mohammed Abdul Azeem's avatar Mohammed Abdul Azeem Kaydeden (comit) Michael Stahl

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/41063Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst 0c3bd1d4
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment