Kaydet (Commit) 848adf43 authored tarafından Matúš Kukan's avatar Matúš Kukan

fastparser: Redundant check after assert

Change-Id: Ibc56102831d4d36392bea4e4e088e207cef99429
üst 6d10a42d
...@@ -623,15 +623,12 @@ void FastSaxParserImpl::DefineNamespace( const OString& rPrefix, const OUString& ...@@ -623,15 +623,12 @@ void FastSaxParserImpl::DefineNamespace( const OString& rPrefix, const OUString&
{ {
Entity& rEntity = getEntity(); Entity& rEntity = getEntity();
assert(!rEntity.maNamespaceCount.empty()); // need a context! assert(!rEntity.maNamespaceCount.empty()); // need a context!
if( !rEntity.maNamespaceCount.empty() )
{
sal_uInt32 nOffset = rEntity.maNamespaceCount.top()++;
if( rEntity.maNamespaceDefines.size() <= nOffset ) sal_uInt32 nOffset = rEntity.maNamespaceCount.top()++;
rEntity.maNamespaceDefines.resize( rEntity.maNamespaceDefines.size() + 64 ); if( rEntity.maNamespaceDefines.size() <= nOffset )
rEntity.maNamespaceDefines.resize( rEntity.maNamespaceDefines.size() + 64 );
rEntity.maNamespaceDefines[nOffset].reset( new NamespaceDefine( rPrefix, GetNamespaceToken( namespaceURL ), namespaceURL ) ); rEntity.maNamespaceDefines[nOffset].reset( new NamespaceDefine( rPrefix, GetNamespaceToken( namespaceURL ), namespaceURL ) );
}
} }
sal_Int32 FastSaxParserImpl::GetToken( const xmlChar* pName, sal_Int32 nameLen /* = 0 */ ) sal_Int32 FastSaxParserImpl::GetToken( const xmlChar* pName, sal_Int32 nameLen /* = 0 */ )
......
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