From d382483fa76028c2d34f75067bff45306c6da34e Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Sat, 19 Aug 2017 09:29:55 +0200 Subject: Code modernization: src/m* (part 3) * empty function * default constructor/destructor * for range-based loops * use emplace_back instead of push_back * remove some unused headers in some cpp variable --- src/map.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/map.cpp') diff --git a/src/map.cpp b/src/map.cpp index c6b4769d8..88c32bbd8 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -1925,9 +1925,8 @@ void ServerMap::save(ModifiedState save_level) // Don't do anything with sqlite unless something is really saved bool save_started = false; - for(std::map::iterator i = m_sectors.begin(); - i != m_sectors.end(); ++i) { - ServerMapSector *sector = (ServerMapSector*)i->second; + for (auto §or_it : m_sectors) { + ServerMapSector *sector = (ServerMapSector*) sector_it.second; assert(sector->getId() == MAPSECTOR_SERVER); if(sector->differs_from_disk || save_level == MOD_STATE_CLEAN) { -- cgit v1.2.3