diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-07-06 18:05:06 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-07-06 18:05:06 +0200 |
commit | 7eaf8b17dd3020c54ab58ae513c1175c95d5ccce (patch) | |
tree | bdf66afe5dff12131d6369d0dcc6ce6b6b641c7c /codemaker | |
parent | 0f92d79708118d99fca4c60c30cd5c63c24e02fb (diff) |
clang-tidy performance-implicit-cast-in-loop
...where the first component of the pair returned by the iterator would be
const, so an implicit conversion would be required.
Change-Id: I62b6ddd799261e1dd63ea5c42a85d8b071f8b8b7
Diffstat (limited to 'codemaker')
-rw-r--r-- | codemaker/source/cppumaker/cpputype.cxx | 2 | ||||
-rw-r--r-- | codemaker/source/cppumaker/includes.cxx | 4 | ||||
-rw-r--r-- | codemaker/source/javamaker/javatype.cxx | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx index 28411bafc228..7eac4f05d767 100644 --- a/codemaker/source/cppumaker/cpputype.cxx +++ b/codemaker/source/cppumaker/cpputype.cxx @@ -443,7 +443,7 @@ void CppuType::dumpDependedTypes( if (!options.isValid("-nD")) { codemaker::cppumaker::Dependencies::Map const & map = m_dependencies.getMap(); - for (const std::pair<OUString,codemaker::cppumaker::Dependencies::Kind>& entry : map) + for (const auto& entry : map) { produce(entry.first, m_typeMgr, generated, options); } diff --git a/codemaker/source/cppumaker/includes.cxx b/codemaker/source/cppumaker/includes.cxx index 0b5bc23f555c..d699996a0df3 100644 --- a/codemaker/source/cppumaker/includes.cxx +++ b/codemaker/source/cppumaker/includes.cxx @@ -136,7 +136,7 @@ void dumpEmptyLineBeforeFirst(FileStream & out, bool * first) { void Includes::dump(FileStream & out, OUString const * companionHdl) { OSL_ASSERT(companionHdl == nullptr || m_hpp); if (!m_includeReference) { - for (const std::pair<OUString, codemaker::cppumaker::Dependencies::Kind>& pair : m_map) + for (const auto& pair : m_map) { if (isInterfaceType(u2b(pair.first))) { m_includeReference = true; @@ -159,7 +159,7 @@ void Includes::dump(FileStream & out, OUString const * companionHdl) { dumpInclude(out, u2b(*companionHdl), false); } bool first = true; - for (const std::pair<OUString, codemaker::cppumaker::Dependencies::Kind>& pair : m_map) + for (const auto& pair : m_map) { dumpEmptyLineBeforeFirst(out, &first); if (m_hpp || pair.second == Dependencies::KIND_BASE diff --git a/codemaker/source/javamaker/javatype.cxx b/codemaker/source/javamaker/javatype.cxx index 038cd328b7bd..06328a92b0cf 100644 --- a/codemaker/source/javamaker/javatype.cxx +++ b/codemaker/source/javamaker/javatype.cxx @@ -757,7 +757,7 @@ void handleEnumType( std::list< ClassFile::Code * > blocks; //FIXME: pointers contained in blocks may leak sal_Int32 last = SAL_MAX_INT32; - for (const std::pair< sal_Int32, OString >& pair : map) + for (const auto& pair : map) { sal_Int32 value = pair.first; if (last != SAL_MAX_INT32) { @@ -783,7 +783,7 @@ void handleEnumType( defCode->instrAreturn(); std::list< std::pair< sal_Int32, ClassFile::Code * > > blocks; //FIXME: pointers contained in blocks may leak - for (const std::pair< sal_Int32, OString >& pair : map ) + for (const auto& pair : map ) { std::unique_ptr< ClassFile::Code > blockCode(cf->newCode()); blockCode->instrGetstatic(className, pair.second, classDescriptor); |