Kaydet (Commit) 91570fc3 authored tarafından Michael Meeks's avatar Michael Meeks

fastparser: avoid boost::optional where it is un-necessary.

boost::optional appears to show up rather heavily on many profiles.
We already use mnElementToken == DONTKNOW to flag / use these guys.

Change-Id: Ibf2b0167f259cc601da2fb9703e880b78e60886e
üst 2da415ee
...@@ -96,10 +96,10 @@ struct NameWithToken ...@@ -96,10 +96,10 @@ struct NameWithToken
struct SaxContext struct SaxContext
{ {
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > mxContext; Reference< XFastContextHandler > mxContext;
sal_Int32 mnElementToken; sal_Int32 mnElementToken;
boost::optional< OUString > maNamespace; OUString maNamespace;
boost::optional< OUString > maElementName; OUString maElementName;
SaxContext( sal_Int32 nElementToken, const OUString& aNamespace, const OUString& aElementName ): SaxContext( sal_Int32 nElementToken, const OUString& aNamespace, const OUString& aElementName ):
mnElementToken(nElementToken) mnElementToken(nElementToken)
...@@ -488,7 +488,7 @@ void Entity::endElement() ...@@ -488,7 +488,7 @@ void Entity::endElement()
if( nElementToken != FastToken::DONTKNOW ) if( nElementToken != FastToken::DONTKNOW )
xContext->endFastElement( nElementToken ); xContext->endFastElement( nElementToken );
else else
xContext->endUnknownElement( aContext.maNamespace.get(), aContext.maElementName.get() ); xContext->endUnknownElement( aContext.maNamespace, aContext.maElementName );
} }
catch (const Exception& e) catch (const Exception& e)
{ {
......
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