From 690f7ff8839c66c29f71f681b9e78cc51923c6b6 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Fri, 25 Jul 2014 15:18:40 -0400 Subject: Store the handler as a const pointer. Handlers are conceptually stateless; we can keep them as const objects. Change-Id: I3d35ab0695037632e82f67f901c9795adf9bdd8d --- include/xmloff/prhdlfac.hxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/xmloff/prhdlfac.hxx b/include/xmloff/prhdlfac.hxx index 3b045831c49a..aca1469fabd0 100644 --- a/include/xmloff/prhdlfac.hxx +++ b/include/xmloff/prhdlfac.hxx @@ -84,7 +84,7 @@ public: protected: /** Retrieves a PropertyHandler from the internal cache */ - XMLPropertyHandler* GetHdlCache( sal_Int32 nType ) const; + const XMLPropertyHandler* GetHdlCache( sal_Int32 nType ) const; /** Puts a PropertyHandler into the internal cache */ void PutHdlCache( sal_Int32 nType, const XMLPropertyHandler* pHdl ) const; @@ -94,7 +94,7 @@ private: SAL_DLLPRIVATE const XMLPropertyHandler* GetBasicHandler( sal_Int32 nType ) const; - typedef ::std::map< sal_Int32, XMLPropertyHandler* > CacheMap; + typedef ::std::map CacheMap; mutable CacheMap maHandlerCache; }; -- cgit