diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-04-07 21:15:55 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-04-07 21:15:55 +0200 |
commit | 9a2dea064082465ba912391f637d4710ad355a64 (patch) | |
tree | 593865e5a77e57e3ee16e42805c0d3011849a007 /framework | |
parent | 8b9207f49f436a886bcb94ae902e16c47484b3cb (diff) |
dllexport class deriving from template means trouble with MSVC
Change-Id: I9d170168eac26c52fd6ca8d22124e8ff78b81226
Diffstat (limited to 'framework')
-rw-r--r-- | framework/inc/classes/protocolhandlercache.hxx | 10 | ||||
-rw-r--r-- | framework/source/fwi/classes/protocolhandlercache.cxx | 12 |
2 files changed, 11 insertions, 11 deletions
diff --git a/framework/inc/classes/protocolhandlercache.hxx b/framework/inc/classes/protocolhandlercache.hxx index cb9c66a8b651..61896c22caaf 100644 --- a/framework/inc/classes/protocolhandlercache.hxx +++ b/framework/inc/classes/protocolhandlercache.hxx @@ -60,13 +60,9 @@ struct FWI_DLLPUBLIC ProtocolHandler uno implementation names as value. Overloading of the index operator makes it possible to search for a key by using a full qualified URL on list of all possible pattern keys. */ -class FWI_DLLPUBLIC PatternHash : public std::unordered_map<OUString, OUString, OUStringHash> -{ - /* interface */ - public: - - PatternHash::iterator findPatternKey( const OUString& sURL ); -}; +typedef std::unordered_map<OUString, OUString, OUStringHash> PatternHash; +FWI_DLLPUBLIC PatternHash::iterator findPatternKey( + PatternHash const & hash, const OUString& sURL); /** This hash holds protocol handler structs by her names. diff --git a/framework/source/fwi/classes/protocolhandlercache.cxx b/framework/source/fwi/classes/protocolhandlercache.cxx index ef48ef01105c..20b26f4d9b99 100644 --- a/framework/source/fwi/classes/protocolhandlercache.cxx +++ b/framework/source/fwi/classes/protocolhandlercache.cxx @@ -49,10 +49,12 @@ namespace framework{ @return An iterator which points to the found item inside the hash or PatternHash::end() if no pattern match this given <var>sURL</var>. */ -PatternHash::iterator PatternHash::findPatternKey( const OUString& sURL ) +namespace { + +PatternHash::const_iterator findPatternKey(PatternHash const * hash, const OUString& sURL) { - PatternHash::iterator pItem = this->begin(); - while( pItem!=this->end() ) + auto pItem = hash->begin(); + while( pItem!=hash->end() ) { WildCard aPattern(pItem->first); if (aPattern.Matches(sURL)) @@ -62,6 +64,8 @@ PatternHash::iterator PatternHash::findPatternKey( const OUString& sURL ) return pItem; } +} + /** @short initialize static member of class HandlerCache @descr We use a singleton pattern to implement this handler cache. @@ -131,7 +135,7 @@ bool HandlerCache::search( const OUString& sURL, ProtocolHandler* pReturn ) cons SolarMutexGuard aGuard; - PatternHash::const_iterator pItem = m_pPattern->findPatternKey(sURL); + PatternHash::const_iterator pItem = findPatternKey(m_pPattern, sURL); if (pItem!=m_pPattern->end()) { *pReturn = (*m_pHandler)[pItem->second]; |