From 1992db1395d9c068327a7c08bac7a24ef7112274 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Blot?= Date: Sat, 19 Aug 2017 11:30:46 +0200 Subject: Code modernization: src/n*, src/o* (#6280) * Code modernization: src/n*, src/o* * empty function * default constructor/destructor * for range-based loops * use emplace_back instead of push_back * remove unused IWritableNodeDefManager::clone() * C++ STL header style * Pointer constness in some functions --- src/nameidmapping.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/nameidmapping.cpp') diff --git a/src/nameidmapping.cpp b/src/nameidmapping.cpp index 78e4a0a56..bd5bb1fc8 100644 --- a/src/nameidmapping.cpp +++ b/src/nameidmapping.cpp @@ -25,10 +25,9 @@ void NameIdMapping::serialize(std::ostream &os) const { writeU8(os, 0); // version writeU16(os, m_id_to_name.size()); - for (IdToNameMap::const_iterator i = m_id_to_name.begin(); - i != m_id_to_name.end(); ++i) { - writeU16(os, i->first); - os << serializeString(i->second); + for (const auto &i : m_id_to_name) { + writeU16(os, i.first); + os << serializeString(i.second); } } -- cgit v1.2.3