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/source/fwi | |
parent | 8b9207f49f436a886bcb94ae902e16c47484b3cb (diff) |
dllexport class deriving from template means trouble with MSVC
Change-Id: I9d170168eac26c52fd6ca8d22124e8ff78b81226
Diffstat (limited to 'framework/source/fwi')
-rw-r--r-- | framework/source/fwi/classes/protocolhandlercache.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
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]; |