diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2013-11-20 12:11:44 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2013-11-20 12:12:50 +0000 |
commit | 9491ca3f64bd44a6a8e63f7d2eae02164f792258 (patch) | |
tree | 5ed4973014c2fe04d5e67dd792ee2229c51928fa /include/sax/fastattribs.hxx | |
parent | 55716b1ed969073f273c00baedb56d8f5de93761 (diff) |
fastparser: avoid excessive alloc/frees for int / bool / double parsing
Change-Id: I596bbc723558f04588d9e767d64732164524e57a
Diffstat (limited to 'include/sax/fastattribs.hxx')
-rw-r--r-- | include/sax/fastattribs.hxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sax/fastattribs.hxx b/include/sax/fastattribs.hxx index c7806039eed4..fd87a946ea5a 100644 --- a/include/sax/fastattribs.hxx +++ b/include/sax/fastattribs.hxx @@ -73,6 +73,10 @@ public: void addUnknown( const OUString& rNamespaceURL, const OString& rName, const sal_Char* pValue ); void addUnknown( const OString& rName, const sal_Char* pValue ); + // performance sensitive shortcuts to avoid allocation ... + bool getAsInteger( sal_Int32 nToken, sal_Int32 &rInt); + bool getAsDouble( sal_Int32 nToken, double &rDouble); + // XFastAttributeList virtual ::sal_Bool SAL_CALL hasAttribute( ::sal_Int32 Token ) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getValueToken( ::sal_Int32 Token ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException); |