summaryrefslogtreecommitdiff
path: root/svl/source/misc
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2016-03-29 21:36:59 +0200
committerJulien Nabet <serval2412@yahoo.fr>2016-03-30 05:06:21 +0000
commita0527676b17838c310701f169ce23d0386b82eb6 (patch)
tree55f06881249f196372d399dc49c0e47d0552ed3d /svl/source/misc
parent1d060568ce8e7b8aa04c418e282962131801bea4 (diff)
Use const_iterator when possible (svl except svdde)
Change-Id: Ie19467a020d1839146d5a6324e54ccf223d99dd6 Reviewed-on: https://gerrit.libreoffice.org/23603 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'svl/source/misc')
-rw-r--r--svl/source/misc/inettype.cxx10
-rw-r--r--svl/source/misc/sharedstringpool.cxx2
2 files changed, 6 insertions, 6 deletions
diff --git a/svl/source/misc/inettype.cxx b/svl/source/misc/inettype.cxx
index fc99529d5902..dddf64352b21 100644
--- a/svl/source/misc/inettype.cxx
+++ b/svl/source/misc/inettype.cxx
@@ -112,7 +112,7 @@ inline TypeIDMapEntry * Registration::getEntry(INetContentType eTypeID)
{
Registration &rRegistration = theRegistration::get();
- TypeIDMap::iterator it = rRegistration.m_aTypeIDMap.find( eTypeID );
+ TypeIDMap::const_iterator it = rRegistration.m_aTypeIDMap.find( eTypeID );
if( it != rRegistration.m_aTypeIDMap.end() )
return it->second;
else
@@ -456,7 +456,7 @@ INetContentType Registration::GetContentType(OUString const & rTypeName)
Registration &rRegistration = theRegistration::get();
OUString aTheTypeName = rTypeName.toAsciiLowerCase();
- TypeNameMap::iterator it = rRegistration.m_aTypeNameMap.find(aTheTypeName);
+ TypeNameMap::const_iterator it = rRegistration.m_aTypeNameMap.find(aTheTypeName);
return it != rRegistration.m_aTypeNameMap.end()
? it->second.m_eTypeID
: CONTENT_TYPE_UNKNOWN;
@@ -467,7 +467,7 @@ OUString Registration::GetContentType(INetContentType eTypeID)
{
Registration &rRegistration = theRegistration::get();
- TypeIDMap::iterator pEntry = rRegistration.m_aTypeIDMap.find( eTypeID );
+ TypeIDMap::const_iterator pEntry = rRegistration.m_aTypeIDMap.find( eTypeID );
if( pEntry != rRegistration.m_aTypeIDMap.end() )
return pEntry->second->m_aTypeName;
return OUString();
@@ -478,7 +478,7 @@ OUString Registration::GetPresentation(INetContentType eTypeID)
{
Registration &rRegistration = theRegistration::get();
- TypeIDMap::iterator pEntry = rRegistration.m_aTypeIDMap.find( eTypeID );
+ TypeIDMap::const_iterator pEntry = rRegistration.m_aTypeIDMap.find( eTypeID );
if( pEntry != rRegistration.m_aTypeIDMap.end() )
return pEntry->second->m_aPresentation;
else
@@ -490,7 +490,7 @@ INetContentType Registration::GetContentType4Extension(OUString const & rExtensi
{
Registration &rRegistration = theRegistration::get();
- ExtensionMap::iterator it = rRegistration.m_aExtensionMap.find(rExtension);
+ ExtensionMap::const_iterator it = rRegistration.m_aExtensionMap.find(rExtension);
return it != rRegistration.m_aExtensionMap.end()
? it->second.m_eTypeID
: CONTENT_TYPE_UNKNOWN;
diff --git a/svl/source/misc/sharedstringpool.cxx b/svl/source/misc/sharedstringpool.cxx
index 70d76955ed50..d1b5aa695a1d 100644
--- a/svl/source/misc/sharedstringpool.cxx
+++ b/svl/source/misc/sharedstringpool.cxx
@@ -85,7 +85,7 @@ SharedString SharedStringPool::intern( const OUString& rStr )
if (!aRes.second)
{
// No new string has been inserted. Return the existing string in the pool.
- StrStoreType::iterator it = mpImpl->maStrStore.find(pOrig);
+ StrStoreType::const_iterator it = mpImpl->maStrStore.find(pOrig);
if (it == mpImpl->maStrStore.end())
return SharedString();