diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-07-25 15:18:40 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-07-25 15:54:12 -0400 |
commit | 690f7ff8839c66c29f71f681b9e78cc51923c6b6 (patch) | |
tree | b114f42f3b36f7402b8ddc72842d71d3b49256ad /xmloff | |
parent | The 'mutable' keyword exists for this kind of use. (diff) | |
download | core-690f7ff8839c66c29f71f681b9e78cc51923c6b6.tar.gz core-690f7ff8839c66c29f71f681b9e78cc51923c6b6.zip |
Store the handler as a const pointer.
Handlers are conceptually stateless; we can keep them as const objects.
Change-Id: I3d35ab0695037632e82f67f901c9795adf9bdd8d
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/style/prhdlfac.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xmloff/source/style/prhdlfac.cxx b/xmloff/source/style/prhdlfac.cxx index 5607585264a0..2829fe6a5152 100644 --- a/xmloff/source/style/prhdlfac.cxx +++ b/xmloff/source/style/prhdlfac.cxx @@ -110,9 +110,9 @@ const XMLPropertyHandler* XMLPropertyHandlerFactory::GetPropertyHandler( sal_Int } // Helper-methods to create and cache PropertyHandler -XMLPropertyHandler* XMLPropertyHandlerFactory::GetHdlCache( sal_Int32 nType ) const +const XMLPropertyHandler* XMLPropertyHandlerFactory::GetHdlCache( sal_Int32 nType ) const { - XMLPropertyHandler* pRet = NULL; + const XMLPropertyHandler* pRet = NULL; if( maHandlerCache.find( nType ) != maHandlerCache.end() ) pRet = maHandlerCache.find( nType )->second; @@ -122,7 +122,7 @@ XMLPropertyHandler* XMLPropertyHandlerFactory::GetHdlCache( sal_Int32 nType ) co void XMLPropertyHandlerFactory::PutHdlCache( sal_Int32 nType, const XMLPropertyHandler* pHdl ) const { - maHandlerCache[nType] = (XMLPropertyHandler*)pHdl; + maHandlerCache[nType] = pHdl; } const XMLPropertyHandler* XMLPropertyHandlerFactory::GetBasicHandler( sal_Int32 nType ) const |