From 34b7a147dcf9831f3b4d81599c473ba01ff5da00 Mon Sep 17 00:00:00 2001 From: David Jones Date: Tue, 25 Aug 2015 21:23:05 +0100 Subject: Change i++ to ++i --- src/client.cpp | 12 ++++++------ src/client/tile.cpp | 6 +++--- src/clientmap.cpp | 2 +- src/collision.cpp | 6 +++--- src/content_cao.cpp | 2 +- src/content_mapblock.cpp | 4 ++-- src/craftdef.cpp | 8 ++++---- src/environment.cpp | 12 ++++++------ src/event_manager.h | 8 ++++---- src/fontengine.cpp | 2 +- src/game.cpp | 14 +++++++------- src/genericobject.cpp | 2 +- src/guiFormSpecMenu.cpp | 8 ++++---- src/guiKeyChangeMenu.cpp | 2 +- src/guiscalingfilter.cpp | 4 ++-- src/hud.cpp | 2 +- src/inventory.cpp | 4 ++-- src/inventorymanager.cpp | 6 +++--- src/itemdef.cpp | 6 +++--- src/log.cpp | 2 +- src/main.cpp | 2 +- src/mapblock.cpp | 6 +++--- src/mapblock_mesh.cpp | 10 +++++----- src/mapnode.cpp | 2 +- src/mesh.cpp | 2 +- src/nameidmapping.cpp | 2 +- src/network/connection.cpp | 12 ++++++------ src/nodedef.cpp | 10 +++++----- src/nodemetadata.cpp | 2 +- src/nodetimer.cpp | 6 +++--- src/particles.cpp | 6 +++--- src/pathfinder.cpp | 8 ++++---- src/rollback.cpp | 4 ++-- src/server.cpp | 24 ++++++++++++------------ src/serverlist.cpp | 4 ++-- src/settings.cpp | 2 +- src/shader.cpp | 2 +- src/sound_openal.cpp | 12 ++++++------ src/subgame.cpp | 6 +++--- src/tool.cpp | 10 +++++----- src/touchscreengui.cpp | 6 +++--- 41 files changed, 125 insertions(+), 125 deletions(-) diff --git a/src/client.cpp b/src/client.cpp index 2a253fd75..dda0f5191 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -86,7 +86,7 @@ MeshUpdateQueue::~MeshUpdateQueue() for(std::vector::iterator i = m_queue.begin(); - i != m_queue.end(); i++) + i != m_queue.end(); ++i) { QueuedMeshUpdate *q = *i; delete q; @@ -113,7 +113,7 @@ void MeshUpdateQueue::addBlock(v3s16 p, MeshMakeData *data, bool ack_block_to_se */ for(std::vector::iterator i = m_queue.begin(); - i != m_queue.end(); i++) + i != m_queue.end(); ++i) { QueuedMeshUpdate *q = *i; if(q->p == p) @@ -146,7 +146,7 @@ QueuedMeshUpdate *MeshUpdateQueue::pop() bool must_be_urgent = !m_urgents.empty(); for(std::vector::iterator i = m_queue.begin(); - i != m_queue.end(); i++) + i != m_queue.end(); ++i) { QueuedMeshUpdate *q = *i; if(must_be_urgent && m_urgents.count(q->p) == 0) @@ -617,7 +617,7 @@ void Client::step(float dtime) { for(std::map::iterator i = m_sounds_to_objects.begin(); - i != m_sounds_to_objects.end(); i++) + i != m_sounds_to_objects.end(); ++i) { int client_id = i->first; u16 object_id = i->second; @@ -642,7 +642,7 @@ void Client::step(float dtime) i != m_sounds_server_to_client.end();) { s32 server_id = i->first; int client_id = i->second; - i++; + ++i; if(!m_sound->soundExists(client_id)) { m_sounds_server_to_client.erase(server_id); m_sounds_client_to_server.erase(client_id); @@ -1105,7 +1105,7 @@ void Client::sendRemovedSounds(std::vector &soundList) pkt << (u16) (server_ids & 0xFFFF); for(std::vector::iterator i = soundList.begin(); - i != soundList.end(); i++) + i != soundList.end(); ++i) pkt << *i; Send(&pkt); diff --git a/src/client/tile.cpp b/src/client/tile.cpp index 1f1e9d38c..f918dee29 100644 --- a/src/client/tile.cpp +++ b/src/client/tile.cpp @@ -194,7 +194,7 @@ class SourceImageCache public: ~SourceImageCache() { for (std::map::iterator iter = m_images.begin(); - iter != m_images.end(); iter++) { + iter != m_images.end(); ++iter) { iter->second->drop(); } m_images.clear(); @@ -461,7 +461,7 @@ TextureSource::~TextureSource() for (std::vector::iterator iter = m_textureinfo_cache.begin(); - iter != m_textureinfo_cache.end(); iter++) + iter != m_textureinfo_cache.end(); ++iter) { //cleanup texture if (iter->texture) @@ -471,7 +471,7 @@ TextureSource::~TextureSource() for (std::vector::iterator iter = m_texture_trash.begin(); iter != m_texture_trash.end(); - iter++) { + ++iter) { video::ITexture *t = *iter; //cleanup trashed texture diff --git a/src/clientmap.cpp b/src/clientmap.cpp index b890e338b..00a5b1021 100644 --- a/src/clientmap.cpp +++ b/src/clientmap.cpp @@ -228,7 +228,7 @@ void ClientMap::updateDrawList(video::IVideoDriver* driver) u32 sector_blocks_drawn = 0; for(MapBlockVect::iterator i = sectorblocks.begin(); - i != sectorblocks.end(); i++) + i != sectorblocks.end(); ++i) { MapBlock *block = *i; diff --git a/src/collision.cpp b/src/collision.cpp index 6afc79ab7..adb6970f5 100644 --- a/src/collision.cpp +++ b/src/collision.cpp @@ -176,7 +176,7 @@ bool wouldCollideWithCeiling( for(std::vector::const_iterator i = staticboxes.begin(); - i != staticboxes.end(); i++) + i != staticboxes.end(); ++i) { const aabb3f& staticbox = *i; if((movingbox.MaxEdge.Y - d <= staticbox.MinEdge.Y) && @@ -265,7 +265,7 @@ collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef, std::vector nodeboxes = n.getCollisionBoxes(gamedef->ndef()); for(std::vector::iterator i = nodeboxes.begin(); - i != nodeboxes.end(); i++) + i != nodeboxes.end(); ++i) { aabb3f box = *i; box.MinEdge += v3f(x, y, z)*BS; @@ -320,7 +320,7 @@ collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef, f32 distance = speed_f.getLength(); std::vector s_objects; s_env->getObjectsInsideRadius(s_objects, pos_f, distance * 1.5); - for (std::vector::iterator iter = s_objects.begin(); iter != s_objects.end(); iter++) { + for (std::vector::iterator iter = s_objects.begin(); iter != s_objects.end(); ++iter) { ServerActiveObject *current = s_env->getActiveObject(*iter); if ((self == 0) || (self != current)) { objects.push_back((ActiveObject*)current); diff --git a/src/content_cao.cpp b/src/content_cao.cpp index 0293b7983..de06e4d4b 100644 --- a/src/content_cao.cpp +++ b/src/content_cao.cpp @@ -1820,7 +1820,7 @@ std::string GenericCAO::debugInfoText() os<<"GenericCAO hp="<first<<"="<second<<", "; } diff --git a/src/content_mapblock.cpp b/src/content_mapblock.cpp index 8fa041312..c4d09e18c 100644 --- a/src/content_mapblock.cpp +++ b/src/content_mapblock.cpp @@ -1548,7 +1548,7 @@ void mapblock_mesh_generate_special(MeshMakeData *data, std::vector boxes = n.getNodeBoxes(nodedef); for(std::vector::iterator i = boxes.begin(); - i != boxes.end(); i++) + i != boxes.end(); ++i) { for(int j = 0; j < 6; j++) { @@ -1689,7 +1689,7 @@ void mapblock_mesh_generate_special(MeshMakeData *data, v3f pos = intToFloat(p, BS); f32 d = 0.05 * BS; for (std::vector::iterator i = boxes.begin(); - i != boxes.end(); i++) { + i != boxes.end(); ++i) { aabb3f box = *i; box.MinEdge += v3f(-d, -d, -d) + pos; box.MaxEdge += v3f(d, d, d) + pos; diff --git a/src/craftdef.cpp b/src/craftdef.cpp index 409481e64..a39bfb37d 100644 --- a/src/craftdef.cpp +++ b/src/craftdef.cpp @@ -964,10 +964,10 @@ public: { std::ostringstream os(std::ios::binary); os << "Crafting definitions:\n"; - for (int type = 0; type <= craft_hash_type_max; type++) { + for (int type = 0; type <= craft_hash_type_max; ++type) { for (std::map >::const_iterator it = (m_craft_defs[type]).begin(); - it != (m_craft_defs[type]).end(); it++) { + it != (m_craft_defs[type]).end(); ++it) { for (std::vector::size_type i = 0; i < it->second.size(); i++) { os << "type " << type @@ -992,10 +992,10 @@ public: } virtual void clear() { - for (int type = 0; type <= craft_hash_type_max; type++) { + for (int type = 0; type <= craft_hash_type_max; ++type) { for (std::map >::iterator it = m_craft_defs[type].begin(); - it != m_craft_defs[type].end(); it++) { + it != m_craft_defs[type].end(); ++it) { for (std::vector::iterator iit = it->second.begin(); iit != it->second.end(); ++iit) { diff --git a/src/environment.cpp b/src/environment.cpp index baeb3a3c6..c337139e8 100644 --- a/src/environment.cpp +++ b/src/environment.cpp @@ -613,19 +613,19 @@ public: = abm->getRequiredNeighbors(); for(std::set::iterator i = required_neighbors_s.begin(); - i != required_neighbors_s.end(); i++) + i != required_neighbors_s.end(); ++i) { ndef->getIds(*i, aabm.required_neighbors); } // Trigger contents std::set contents_s = abm->getTriggerContents(); for(std::set::iterator - i = contents_s.begin(); i != contents_s.end(); i++) + i = contents_s.begin(); i != contents_s.end(); ++i) { std::set ids; ndef->getIds(*i, ids); for(std::set::const_iterator k = ids.begin(); - k != ids.end(); k++) + k != ids.end(); ++k) { content_t c = *k; std::map >::iterator j; @@ -694,7 +694,7 @@ public: continue; for(std::vector::iterator - i = j->second.begin(); i != j->second.end(); i++) { + i = j->second.begin(); i != j->second.end(); ++i) { if(myrand() % i->chance != 0) continue; @@ -772,7 +772,7 @@ void ServerEnvironment::activateBlock(MapBlock *block, u32 additional_dtime) MapNode n; for(std::map::iterator i = elapsed_timers.begin(); - i != elapsed_timers.end(); i++){ + i != elapsed_timers.end(); ++i){ n = block->getNodeNoEx(i->first); v3s16 p = i->first + block->getPosRelative(); if(m_script->node_on_timer(p,n,i->second.elapsed)) @@ -1161,7 +1161,7 @@ void ServerEnvironment::step(float dtime) MapNode n; for(std::map::iterator i = elapsed_timers.begin(); - i != elapsed_timers.end(); i++){ + i != elapsed_timers.end(); ++i){ n = block->getNodeNoEx(i->first); p = i->first + block->getPosRelative(); if(m_script->node_on_timer(p,n,i->second.elapsed)) diff --git a/src/event_manager.h b/src/event_manager.h index 33d99b28c..f926922f5 100644 --- a/src/event_manager.h +++ b/src/event_manager.h @@ -53,7 +53,7 @@ public: if(i != m_dest.end()){ std::list &funcs = i->second.funcs; for(std::list::iterator i = funcs.begin(); - i != funcs.end(); i++){ + i != funcs.end(); ++i){ (*(i->f))(e, i->d); } } @@ -83,12 +83,12 @@ public: if(remove) funcs.erase(j++); else - j++; + ++j; } } } else{ for(std::map::iterator - i = m_dest.begin(); i != m_dest.end(); i++){ + i = m_dest.begin(); i != m_dest.end(); ++i){ std::list &funcs = i->second.funcs; std::list::iterator j = funcs.begin(); while(j != funcs.end()){ @@ -96,7 +96,7 @@ public: if(remove) funcs.erase(j++); else - j++; + ++j; } } } diff --git a/src/fontengine.cpp b/src/fontengine.cpp index f881701e0..55ff001e7 100644 --- a/src/fontengine.cpp +++ b/src/fontengine.cpp @@ -122,7 +122,7 @@ void FontEngine::cleanCache() for (std::map::iterator iter = m_font_cache[i].begin(); - iter != m_font_cache[i].end(); iter++) { + iter != m_font_cache[i].end(); ++iter) { iter->second->drop(); iter->second = NULL; } diff --git a/src/game.cpp b/src/game.cpp index 11e868a80..0e26493a2 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -375,7 +375,7 @@ PointedThing getPointedThing(Client *client, v3f player_position, for (std::vector::const_iterator i = boxes.begin(); - i != boxes.end(); i++) { + i != boxes.end(); ++i) { aabb3f box = *i; box.MinEdge += npf; box.MaxEdge += npf; @@ -420,7 +420,7 @@ PointedThing getPointedThing(Client *client, v3f player_position, if (!g_settings->getBool("enable_node_highlighting")) { for (std::vector::const_iterator i2 = boxes.begin(); - i2 != boxes.end(); i2++) { + i2 != boxes.end(); ++i2) { aabb3f box = *i2; box.MinEdge += npf + v3f(-d, -d, -d) - intToFloat(camera_offset, BS); box.MaxEdge += npf + v3f(d, d, d) - intToFloat(camera_offset, BS); @@ -514,11 +514,11 @@ public: std::map m_meta; for (std::vector::const_iterator k = m_log.begin(); - k != m_log.end(); k++) { + k != m_log.end(); ++k) { const Piece &piece = *k; for (Profiler::GraphValues::const_iterator i = piece.values.begin(); - i != piece.values.end(); i++) { + i != piece.values.end(); ++i) { const std::string &id = i->first; const float &value = i->second; std::map::iterator j = @@ -550,7 +550,7 @@ public: u32 next_color_i = 0; for (std::map::iterator i = m_meta.begin(); - i != m_meta.end(); i++) { + i != m_meta.end(); ++i) { Meta &meta = i->second; video::SColor color(255, 200, 200, 200); @@ -566,7 +566,7 @@ public: s32 meta_i = 0; for (std::map::const_iterator i = m_meta.begin(); - i != m_meta.end(); i++) { + i != m_meta.end(); ++i) { const std::string &id = i->first; const Meta &meta = i->second; s32 x = x_left; @@ -602,7 +602,7 @@ public: bool lastscaledvalue_exists = false; for (std::vector::const_iterator j = m_log.begin(); - j != m_log.end(); j++) { + j != m_log.end(); ++j) { const Piece &piece = *j; float value = 0; bool value_exists = false; diff --git a/src/genericobject.cpp b/src/genericobject.cpp index 90e8cf3d3..368cae1ff 100644 --- a/src/genericobject.cpp +++ b/src/genericobject.cpp @@ -110,7 +110,7 @@ std::string gob_cmd_update_armor_groups(const ItemGroupList &armor_groups) writeU8(os, GENERIC_CMD_UPDATE_ARMOR_GROUPS); writeU16(os, armor_groups.size()); for(ItemGroupList::const_iterator i = armor_groups.begin(); - i != armor_groups.end(); i++){ + i != armor_groups.end(); ++i){ os<first); writeS16(os, i->second); } diff --git a/src/guiFormSpecMenu.cpp b/src/guiFormSpecMenu.cpp index 62a84460f..d6cd61a8d 100644 --- a/src/guiFormSpecMenu.cpp +++ b/src/guiFormSpecMenu.cpp @@ -2103,7 +2103,7 @@ bool GUIFormSpecMenu::getAndroidUIInput() } for(std::vector::iterator iter = m_fields.begin(); - iter != m_fields.end(); iter++) { + iter != m_fields.end(); ++iter) { if (iter->fname != fieldname) { continue; @@ -2473,7 +2473,7 @@ void GUIFormSpecMenu::drawMenu() if (id != -1 && delta >= m_tooltip_show_delay) { for(std::vector::iterator iter = m_fields.begin(); - iter != m_fields.end(); iter++) { + iter != m_fields.end(); ++iter) { if ( (iter->fid == id) && (m_tooltips[iter->fname].tooltip != "") ){ if (m_old_tooltip != m_tooltips[iter->fname].tooltip) { m_old_tooltip = m_tooltips[iter->fname].tooltip; @@ -3609,7 +3609,7 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event) std::string GUIFormSpecMenu::getNameByID(s32 id) { for(std::vector::iterator iter = m_fields.begin(); - iter != m_fields.end(); iter++) { + iter != m_fields.end(); ++iter) { if (iter->fid == id) { return iter->fname; } @@ -3625,7 +3625,7 @@ std::string GUIFormSpecMenu::getNameByID(s32 id) std::wstring GUIFormSpecMenu::getLabelByID(s32 id) { for(std::vector::iterator iter = m_fields.begin(); - iter != m_fields.end(); iter++) { + iter != m_fields.end(); ++iter) { if (iter->fid == id) { return iter->flabel; } diff --git a/src/guiKeyChangeMenu.cpp b/src/guiKeyChangeMenu.cpp index 261592394..bb878d6ef 100644 --- a/src/guiKeyChangeMenu.cpp +++ b/src/guiKeyChangeMenu.cpp @@ -81,7 +81,7 @@ GUIKeyChangeMenu::~GUIKeyChangeMenu() removeChildren(); for (std::vector::iterator iter = key_settings.begin(); - iter != key_settings.end(); iter ++) { + iter != key_settings.end(); ++iter) { delete[] (*iter)->button_name; delete (*iter); } diff --git a/src/guiscalingfilter.cpp b/src/guiscalingfilter.cpp index 26a2265a8..41cc72836 100644 --- a/src/guiscalingfilter.cpp +++ b/src/guiscalingfilter.cpp @@ -51,13 +51,13 @@ void guiScalingCache(io::path key, video::IVideoDriver *driver, video::IImage *v void guiScalingCacheClear(video::IVideoDriver *driver) { for (std::map::iterator it = g_imgCache.begin(); - it != g_imgCache.end(); it++) { + it != g_imgCache.end(); ++it) { if (it->second != NULL) it->second->drop(); } g_imgCache.clear(); for (std::map::iterator it = g_txrCache.begin(); - it != g_txrCache.end(); it++) { + it != g_txrCache.end(); ++it) { if (it->second != NULL) driver->removeTexture(it->second); } diff --git a/src/hud.cpp b/src/hud.cpp index dbc4a01a3..d1313089a 100644 --- a/src/hud.cpp +++ b/src/hud.cpp @@ -468,7 +468,7 @@ void Hud::drawCrosshair() { void Hud::drawSelectionBoxes(std::vector &hilightboxes) { for (std::vector::const_iterator i = hilightboxes.begin(); - i != hilightboxes.end(); i++) { + i != hilightboxes.end(); ++i) { driver->draw3DBox(*i, selectionbox_argb); } } diff --git a/src/inventory.cpp b/src/inventory.cpp index af8b1b301..67f979b13 100644 --- a/src/inventory.cpp +++ b/src/inventory.cpp @@ -730,7 +730,7 @@ bool InventoryList::containsItem(const ItemStack &item) const return true; for(std::vector::const_reverse_iterator i = m_items.rbegin(); - i != m_items.rend(); i++) + i != m_items.rend(); ++i) { if(count == 0) break; @@ -750,7 +750,7 @@ ItemStack InventoryList::removeItem(const ItemStack &item) ItemStack removed; for(std::vector::reverse_iterator i = m_items.rbegin(); - i != m_items.rend(); i++) + i != m_items.rend(); ++i) { if(i->name == item.name) { diff --git a/src/inventorymanager.cpp b/src/inventorymanager.cpp index 476768b8c..d4e8d2f25 100644 --- a/src/inventorymanager.cpp +++ b/src/inventorymanager.cpp @@ -818,9 +818,9 @@ void ICraftAction::apply(InventoryManager *mgr, // Add the new replacements to the list IItemDefManager *itemdef = gamedef->getItemDefManager(); for (std::vector::iterator it = temp.begin(); - it != temp.end(); it++) { + it != temp.end(); ++it) { for (std::vector::iterator jt = output_replacements.begin(); - jt != output_replacements.end(); jt++) { + jt != output_replacements.end(); ++jt) { if (it->name == jt->name) { *it = jt->addItem(*it, itemdef); if (it->empty()) @@ -850,7 +850,7 @@ void ICraftAction::apply(InventoryManager *mgr, // Put the replacements in the inventory or drop them on the floor, if // the invenotry is full for (std::vector::iterator it = output_replacements.begin(); - it != output_replacements.end(); it++) { + it != output_replacements.end(); ++it) { if (list_main) *it = list_main->addItem(*it); if (it->empty()) diff --git a/src/itemdef.cpp b/src/itemdef.cpp index 0133b1b3f..08ff887b2 100644 --- a/src/itemdef.cpp +++ b/src/itemdef.cpp @@ -145,7 +145,7 @@ void ItemDefinition::serialize(std::ostream &os, u16 protocol_version) const os<::const_iterator - i = groups.begin(); i != groups.end(); i++){ + i = groups.begin(); i != groups.end(); ++i){ os<first); writeS16(os, i->second); } @@ -261,7 +261,7 @@ public: #endif for (std::map::iterator iter = m_item_definitions.begin(); iter != m_item_definitions.end(); - iter ++) { + ++iter) { delete iter->second; } m_item_definitions.clear(); @@ -500,7 +500,7 @@ public: { for(std::map::const_iterator i = m_item_definitions.begin(); - i != m_item_definitions.end(); i++) + i != m_item_definitions.end(); ++i) { delete i->second; } diff --git a/src/log.cpp b/src/log.cpp index 9dc574d01..c584d126a 100644 --- a/src/log.cpp +++ b/src/log.cpp @@ -141,7 +141,7 @@ void log_printline(enum LogMessageLevel lev, const std::string &text) os << getTimestamp() << ": " << levelname << "["<::iterator i = log_outputs[lev].begin(); - i != log_outputs[lev].end(); i++) { + i != log_outputs[lev].end(); ++i) { ILogOutput *out = *i; if (out->silence) continue; diff --git a/src/main.cpp b/src/main.cpp index 56ba7fac9..950d30b5a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -357,7 +357,7 @@ static void list_game_ids() { std::set gameids = getAvailableGameIds(); for (std::set::const_iterator i = gameids.begin(); - i != gameids.end(); i++) + i != gameids.end(); ++i) dstream << (*i) <::const_iterator i = unknown_contents.begin(); - i != unknown_contents.end(); i++){ + i != unknown_contents.end(); ++i){ errorstream<<"getBlockNodeIdMapping(): IGNORING ERROR: " <<"Name for node id "<<(*i)<<" not known"<::const_iterator i = unnamed_contents.begin(); - i != unnamed_contents.end(); i++){ + i != unnamed_contents.end(); ++i){ errorstream<<"correctBlockNodeIds(): IGNORING ERROR: " <<"Block contains id "<<(*i) <<" with no name mapping"<::const_iterator i = unallocatable_contents.begin(); - i != unallocatable_contents.end(); i++){ + i != unallocatable_contents.end(); ++i){ errorstream<<"correctBlockNodeIds(): IGNORING ERROR: " <<"Could not allocate global id for node name \"" <<(*i)<<"\""<::iterator i = m_crack_materials.begin(); - i != m_crack_materials.end(); i++) + i != m_crack_materials.end(); ++i) { scene::IMeshBuffer *buf = m_mesh->getMeshBuffer(i->first); std::string basename = i->second; @@ -1328,7 +1328,7 @@ bool MapBlockMesh::animate(bool faraway, float time, int crack, u32 daynight_rat // Texture animation for(std::map::iterator i = m_animation_tiles.begin(); - i != m_animation_tiles.end(); i++) + i != m_animation_tiles.end(); ++i) { const TileSpec &tile = i->second; // Figure out current frame @@ -1358,13 +1358,13 @@ bool MapBlockMesh::animate(bool faraway, float time, int crack, u32 daynight_rat { for(std::map > >::iterator i = m_daynight_diffs.begin(); - i != m_daynight_diffs.end(); i++) + i != m_daynight_diffs.end(); ++i) { scene::IMeshBuffer *buf = m_mesh->getMeshBuffer(i->first); video::S3DVertexTangents *vertices = (video::S3DVertexTangents *)buf->getVertices(); for(std::map >::iterator j = i->second.begin(); - j != i->second.end(); j++) + j != i->second.end(); ++j) { u8 day = j->second.first; u8 night = j->second.second; @@ -1389,7 +1389,7 @@ bool MapBlockMesh::animate(bool faraway, float time, int crack, u32 daynight_rat for(std::list::iterator i = m_highlighted_materials.begin(); - i != m_highlighted_materials.end(); i++) + i != m_highlighted_materials.end(); ++i) { scene::IMeshBuffer *buf = m_mesh->getMeshBuffer(*i); video::S3DVertexTangents *vertices = (video::S3DVertexTangents*)buf->getVertices(); diff --git a/src/mapnode.cpp b/src/mapnode.cpp index fe9686f0d..732237833 100644 --- a/src/mapnode.cpp +++ b/src/mapnode.cpp @@ -192,7 +192,7 @@ static std::vector transformNodeBox(const MapNode &n, facedir&=0x03; for(std::vector::const_iterator i = fixed.begin(); - i != fixed.end(); i++) + i != fixed.end(); ++i) { aabb3f box = *i; diff --git a/src/mesh.cpp b/src/mesh.cpp index dab1575f3..329b93dc9 100644 --- a/src/mesh.cpp +++ b/src/mesh.cpp @@ -402,7 +402,7 @@ scene::IMesh* convertNodeboxNodeToMesh(ContentFeatures *f) for(std::vector::iterator i = boxes.begin(); - i != boxes.end(); i++) + i != boxes.end(); ++i) { aabb3f box = *i; diff --git a/src/nameidmapping.cpp b/src/nameidmapping.cpp index ebe65076e..ed59ddd16 100644 --- a/src/nameidmapping.cpp +++ b/src/nameidmapping.cpp @@ -27,7 +27,7 @@ void NameIdMapping::serialize(std::ostream &os) const writeU16(os, m_id_to_name.size()); for(std::map::const_iterator i = m_id_to_name.begin(); - i != m_id_to_name.end(); i++){ + i != m_id_to_name.end(); ++i){ writeU16(os, i->first); os<second); } diff --git a/src/network/connection.cpp b/src/network/connection.cpp index 10f0d5543..d73d4ba17 100644 --- a/src/network/connection.cpp +++ b/src/network/connection.cpp @@ -294,7 +294,7 @@ BufferedPacket ReliablePacketBuffer::popSeqnum(u16 seqnum) RPBSearchResult next = r; - next++; + ++next; if (next != notFound()) { u16 s = readU16(&(next->data[BASE_HEADER_SIZE+1])); m_oldest_non_answered_ack = s; @@ -358,7 +358,7 @@ void ReliablePacketBuffer::insert(BufferedPacket &p,u16 next_expected) /* this is true e.g. on wrap around */ if (seqnum < next_expected) { while(((s < seqnum) || (s >= next_expected)) && (i != m_list.end())) { - i++; + ++i; if (i != m_list.end()) s = readU16(&(i->data[BASE_HEADER_SIZE+1])); } @@ -367,7 +367,7 @@ void ReliablePacketBuffer::insert(BufferedPacket &p,u16 next_expected) else { while(((s < seqnum) && (s >= next_expected)) && (i != m_list.end())) { - i++; + ++i; if (i != m_list.end()) s = readU16(&(i->data[BASE_HEADER_SIZE+1])); } @@ -1760,7 +1760,7 @@ void ConnectionSendThread::disconnect() for (std::list::iterator i = peerids.begin(); i != peerids.end(); - i++) + ++i) { sendAsPacket(*i, 0,data,false); } @@ -1840,7 +1840,7 @@ void ConnectionSendThread::sendToAll(u8 channelnum, SharedBuffer data) for (std::list::iterator i = peerids.begin(); i != peerids.end(); - i++) + ++i) { send(*i, channelnum, data); } @@ -1852,7 +1852,7 @@ void ConnectionSendThread::sendToAllReliable(ConnectionCommand &c) for (std::list::iterator i = peerids.begin(); i != peerids.end(); - i++) + ++i) { PeerHelper peer = m_connection->getPeerNoEx(*i); diff --git a/src/nodedef.cpp b/src/nodedef.cpp index 269c2b9d6..5a1578bba 100644 --- a/src/nodedef.cpp +++ b/src/nodedef.cpp @@ -65,7 +65,7 @@ void NodeBox::serialize(std::ostream &os, u16 protocol_version) const writeU16(os, fixed.size()); for(std::vector::const_iterator i = fixed.begin(); - i != fixed.end(); i++) + i != fixed.end(); ++i) { writeV3F1000(os, i->MinEdge); writeV3F1000(os, i->MaxEdge); @@ -266,7 +266,7 @@ void ContentFeatures::serialize(std::ostream &os, u16 protocol_version) const os<first); writeS16(os, i->second); } @@ -709,7 +709,7 @@ void CNodeDefManager::updateAliases(IItemDefManager *idef) std::set all = idef->getAll(); m_name_id_mapping_with_aliases.clear(); for (std::set::iterator - i = all.begin(); i != all.end(); i++) { + i = all.begin(); i != all.end(); ++i) { std::string name = *i; std::string convert_to = idef->getAlias(name); content_t id; @@ -1162,7 +1162,7 @@ void ContentFeatures::serializeOld(std::ostream &os, u16 protocol_version) const os<first); writeS16(os, i->second); } @@ -1210,7 +1210,7 @@ void ContentFeatures::serializeOld(std::ostream &os, u16 protocol_version) const os<first); writeS16(os, i->second); } diff --git a/src/nodemetadata.cpp b/src/nodemetadata.cpp index d4da7a5ed..2a9131be0 100644 --- a/src/nodemetadata.cpp +++ b/src/nodemetadata.cpp @@ -96,7 +96,7 @@ void NodeMetadataList::serialize(std::ostream &os) const for(std::map::const_iterator i = m_data.begin(); - i != m_data.end(); i++) + i != m_data.end(); ++i) { v3s16 p = i->first; NodeMetadata *data = i->second; diff --git a/src/nodetimer.cpp b/src/nodetimer.cpp index 790b46076..a5b48a5af 100644 --- a/src/nodetimer.cpp +++ b/src/nodetimer.cpp @@ -62,7 +62,7 @@ void NodeTimerList::serialize(std::ostream &os, u8 map_format_version) const for(std::map::const_iterator i = m_data.begin(); - i != m_data.end(); i++){ + i != m_data.end(); ++i){ v3s16 p = i->first; NodeTimer t = i->second; @@ -134,7 +134,7 @@ std::map NodeTimerList::step(float dtime) // Increment timers for(std::map::iterator i = m_data.begin(); - i != m_data.end(); i++){ + i != m_data.end(); ++i){ v3s16 p = i->first; NodeTimer t = i->second; t.elapsed += dtime; @@ -146,7 +146,7 @@ std::map NodeTimerList::step(float dtime) // Delete elapsed timers for(std::map::const_iterator i = elapsed_timers.begin(); - i != elapsed_timers.end(); i++){ + i != elapsed_timers.end(); ++i){ v3s16 p = i->first; m_data.erase(p); } diff --git a/src/particles.cpp b/src/particles.cpp index ab48bae9e..ebb54a49a 100644 --- a/src/particles.cpp +++ b/src/particles.cpp @@ -288,7 +288,7 @@ void ParticleSpawner::step(float dtime, ClientEnvironment* env) } else { - i++; + ++i; } } } @@ -360,7 +360,7 @@ void ParticleManager::stepSpawners (float dtime) else { i->second->step(dtime, m_env); - i++; + ++i; } } } @@ -380,7 +380,7 @@ void ParticleManager::stepParticles (float dtime) else { (*i)->step(dtime); - i++; + ++i; } } } diff --git a/src/pathfinder.cpp b/src/pathfinder.cpp index 8eb52bfd1..673d5077e 100644 --- a/src/pathfinder.cpp +++ b/src/pathfinder.cpp @@ -313,7 +313,7 @@ std::vector pathfinder::get_Path(ServerEnvironment* env, //finalize path std::vector full_path; for (std::vector::iterator i = path.begin(); - i != path.end(); i++) { + i != path.end(); ++i) { full_path.push_back(getIndexElement(*i).pos); } @@ -724,7 +724,7 @@ v3s16 pathfinder::get_dir_heuristic(std::vector& directions,path_gridnode for (std::vector::iterator iter = directions.begin(); iter != directions.end(); - iter ++) { + ++iter) { v3s16 pos1 = v3s16(srcpos.X + iter->X,0,srcpos.Z+iter->Z); @@ -749,7 +749,7 @@ v3s16 pathfinder::get_dir_heuristic(std::vector& directions,path_gridnode if (retdir != v3s16(0,0,0)) { for (std::vector::iterator iter = directions.begin(); iter != directions.end(); - iter ++) { + ++iter) { if(*iter == retdir) { DEBUG_OUT("Pathfinder: removing return direction" << std::endl); directions.erase(iter); @@ -1064,7 +1064,7 @@ void pathfinder::print_path(std::vector path) { unsigned int current = 0; for (std::vector::iterator i = path.begin(); - i != path.end(); i++) { + i != path.end(); ++i) { std::cout << std::setw(3) << current << ":" << PPOS((*i)) << std::endl; current++; } diff --git a/src/rollback.cpp b/src/rollback.cpp index 7267a50f6..a6b79393a 100644 --- a/src/rollback.cpp +++ b/src/rollback.cpp @@ -858,7 +858,7 @@ std::string RollbackManager::getSuspect(v3s16 p, float nearness_shortcut, float likely_suspect_nearness = 0; for (std::list::const_reverse_iterator i = action_latest_buffer.rbegin(); - i != action_latest_buffer.rend(); i++) { + i != action_latest_buffer.rend(); ++i) { if (i->unix_time < first_time) { break; } @@ -897,7 +897,7 @@ void RollbackManager::flush() for (iter = action_todisk_buffer.begin(); iter != action_todisk_buffer.end(); - iter++) { + ++iter) { if (iter->actor == "") { continue; } diff --git a/src/server.cpp b/src/server.cpp index 009ea7b0e..646e8465b 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -285,14 +285,14 @@ Server::Server( // Print mods infostream << "Server: Loading mods: "; for(std::vector::iterator i = m_mods.begin(); - i != m_mods.end(); i++) { + i != m_mods.end(); ++i) { const ModSpec &mod = *i; infostream << mod.name << " "; } infostream << std::endl; // Load and run "mod" scripts for (std::vector::iterator i = m_mods.begin(); - i != m_mods.end(); i++) { + i != m_mods.end(); ++i) { const ModSpec &mod = *i; if (!string_allowed(mod.name, MODNAME_ALLOWED_CHARS)) { std::ostringstream err; @@ -426,7 +426,7 @@ Server::~Server() // Delete detached inventories for (std::map::iterator i = m_detached_inventories.begin(); - i != m_detached_inventories.end(); i++) { + i != m_detached_inventories.end(); ++i) { delete i->second; } } @@ -1149,7 +1149,7 @@ PlayerSAO* Server::StageTwoClientInit(u16 peer_id) actionstream<getName() <<" joins game. List of players: "; for (std::vector::iterator i = names.begin(); - i != names.end(); i++) { + i != names.end(); ++i) { actionstream << *i << " "; } @@ -1912,7 +1912,7 @@ void Server::SendPlayerPrivileges(u16 peer_id) pkt << (u16) privs.size(); for(std::set::const_iterator i = privs.begin(); - i != privs.end(); i++) { + i != privs.end(); ++i) { pkt << (*i); } @@ -2012,7 +2012,7 @@ s32 Server::playSound(const SimpleSoundSpec &spec, << (u8) params.type << pos << params.object << params.loop; for(std::vector::iterator i = dst_clients.begin(); - i != dst_clients.end(); i++) { + i != dst_clients.end(); ++i) { psound.clients.insert(*i); m_clients.send(*i, 0, &pkt, true); } @@ -2031,7 +2031,7 @@ void Server::stopSound(s32 handle) pkt << handle; for(std::set::iterator i = psound.clients.begin(); - i != psound.clients.end(); i++) { + i != psound.clients.end(); ++i) { // Send as reliable m_clients.send(*i, 0, &pkt, true); } @@ -2227,7 +2227,7 @@ void Server::fillMediaCache() // Collect all media file paths std::vector paths; for(std::vector::iterator i = m_mods.begin(); - i != m_mods.end(); i++) { + i != m_mods.end(); ++i) { const ModSpec &mod = *i; paths.push_back(mod.path + DIR_DELIM + "textures"); paths.push_back(mod.path + DIR_DELIM + "sounds"); @@ -2238,7 +2238,7 @@ void Server::fillMediaCache() // Collect media file information from paths into cache for(std::vector::iterator i = paths.begin(); - i != paths.end(); i++) { + i != paths.end(); ++i) { std::string mediapath = *i; std::vector dirlist = fs::GetDirListing(mediapath); for (u32 j = 0; j < dirlist.size(); j++) { @@ -2489,7 +2489,7 @@ void Server::sendDetachedInventories(u16 peer_id) for(std::map::iterator i = m_detached_inventories.begin(); - i != m_detached_inventories.end(); i++) { + i != m_detached_inventories.end(); ++i) { const std::string &name = i->first; //Inventory *inv = i->second; sendDetachedInventory(name, peer_id); @@ -2640,7 +2640,7 @@ void Server::DeleteClient(u16 peer_id, ClientDeletionReason reason) if(psound.clients.empty()) m_playing_sounds.erase(i++); else - i++; + ++i; } Player *player = m_env->getPlayer(peer_id); @@ -3153,7 +3153,7 @@ bool Server::rollbackRevertActions(const std::list &actions, for(std::list::const_iterator i = actions.begin(); - i != actions.end(); i++) + i != actions.end(); ++i) { const RollbackAction &action = *i; num_tried++; diff --git a/src/serverlist.cpp b/src/serverlist.cpp index a33d1d6bf..6e79b55a4 100644 --- a/src/serverlist.cpp +++ b/src/serverlist.cpp @@ -165,7 +165,7 @@ const std::string serialize(const std::vector &serverlist) std::string liststring; for (std::vector::const_iterator it = serverlist.begin(); it != serverlist.end(); - it++) { + ++it) { liststring += "[server]\n"; liststring += (*it)["name"].asString() + '\n'; liststring += (*it)["address"].asString() + '\n'; @@ -182,7 +182,7 @@ const std::string serializeJson(const std::vector &serverlist) Json::Value list(Json::arrayValue); for (std::vector::const_iterator it = serverlist.begin(); it != serverlist.end(); - it++) { + ++it) { list.append(*it); } root["list"] = list; diff --git a/src/settings.cpp b/src/settings.cpp index 3d4d56fa3..e1e01e81a 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -1009,7 +1009,7 @@ void Settings::doCallbacks(const std::string name) if (iterToVector != m_callbacks.end()) { std::vector >::iterator iter; - for (iter = iterToVector->second.begin(); iter != iterToVector->second.end(); iter++) + for (iter = iterToVector->second.begin(); iter != iterToVector->second.end(); ++iter) { (iter->first)(name, iter->second); } diff --git a/src/shader.cpp b/src/shader.cpp index e441883fb..cbde9295e 100644 --- a/src/shader.cpp +++ b/src/shader.cpp @@ -379,7 +379,7 @@ ShaderSource::ShaderSource(IrrlichtDevice *device): ShaderSource::~ShaderSource() { for (std::vector::iterator iter = m_global_setters.begin(); - iter != m_global_setters.end(); iter++) { + iter != m_global_setters.end(); ++iter) { delete *iter; } m_global_setters.clear(); diff --git a/src/sound_openal.cpp b/src/sound_openal.cpp index cb4c7b581..195775396 100644 --- a/src/sound_openal.cpp +++ b/src/sound_openal.cpp @@ -273,9 +273,9 @@ public: m_device = NULL; for (std::map >::iterator i = m_buffers.begin(); - i != m_buffers.end(); i++) { + i != m_buffers.end(); ++i) { for (std::vector::iterator iter = (*i).second.begin(); - iter != (*i).second.end(); iter++) { + iter != (*i).second.end(); ++iter) { delete *iter; } (*i).second.clear(); @@ -402,11 +402,11 @@ public: std::set datas; m_fetcher->fetchSounds(name, paths, datas); for(std::set::iterator i = paths.begin(); - i != paths.end(); i++){ + i != paths.end(); ++i){ loadSoundFile(name, *i); } for(std::set::iterator i = datas.begin(); - i != datas.end(); i++){ + i != datas.end(); ++i){ loadSoundData(name, *i); } return getBuffer(name); @@ -421,7 +421,7 @@ public: std::set del_list; for(std::map::iterator i = m_sounds_playing.begin(); - i != m_sounds_playing.end(); i++) + i != m_sounds_playing.end(); ++i) { int id = i->first; PlayingSound *sound = i->second; @@ -438,7 +438,7 @@ public: verbosestream<<"OpenALSoundManager::maintain(): deleting " <::iterator i = del_list.begin(); - i != del_list.end(); i++) + i != del_list.end(); ++i) { deleteSound(*i); } diff --git a/src/subgame.cpp b/src/subgame.cpp index f736a78c6..a3fdce15a 100644 --- a/src/subgame.cpp +++ b/src/subgame.cpp @@ -163,7 +163,7 @@ std::set getAvailableGameIds() } for(std::set::const_iterator i = gamespaths.begin(); - i != gamespaths.end(); i++){ + i != gamespaths.end(); ++i){ std::vector dirlist = fs::GetDirListing(*i); for(u32 j=0; j getAvailableGames() std::vector specs; std::set gameids = getAvailableGameIds(); for(std::set::const_iterator i = gameids.begin(); - i != gameids.end(); i++) + i != gameids.end(); ++i) specs.push_back(findSubgame(*i)); return specs; } @@ -230,7 +230,7 @@ std::vector getAvailableWorlds() worldspaths.insert(porting::path_user + DIR_DELIM + "worlds"); infostream<<"Searching worlds..."<::const_iterator i = worldspaths.begin(); - i != worldspaths.end(); i++){ + i != worldspaths.end(); ++i){ infostream<<" In "<<(*i)<<": "< dirvector = fs::GetDirListing(*i); for(u32 j=0; j::const_iterator - i = groupcaps.begin(); i != groupcaps.end(); i++){ + i = groupcaps.begin(); i != groupcaps.end(); ++i){ const std::string *name = &i->first; const ToolGroupCap *cap = &i->second; os<maxlevel); writeU32(os, cap->times.size()); for(std::map::const_iterator - i = cap->times.begin(); i != cap->times.end(); i++){ + i = cap->times.begin(); i != cap->times.end(); ++i){ writeS16(os, i->first); writeF1000(os, i->second); } @@ -51,7 +51,7 @@ void ToolCapabilities::serialize(std::ostream &os, u16 protocol_version) const if(protocol_version > 17){ writeU32(os, damageGroups.size()); for(std::map::const_iterator - i = damageGroups.begin(); i != damageGroups.end(); i++){ + i = damageGroups.begin(); i != damageGroups.end(); ++i){ os<first); writeS16(os, i->second); } @@ -116,7 +116,7 @@ DigParams getDigParams(const ItemGroupList &groups, int level = itemgroup_get(groups, "level"); //infostream<<"level="<::const_iterator - i = tp->groupcaps.begin(); i != tp->groupcaps.end(); i++){ + i = tp->groupcaps.begin(); i != tp->groupcaps.end(); ++i){ const std::string &name = i->first; //infostream<<"group="<second; @@ -164,7 +164,7 @@ HitParams getHitParams(const ItemGroupList &armor_groups, float full_punch_interval = tp->full_punch_interval; for(std::map::const_iterator - i = tp->damageGroups.begin(); i != tp->damageGroups.end(); i++){ + i = tp->damageGroups.begin(); i != tp->damageGroups.end(); ++i){ s16 armor = itemgroup_get(armor_groups, i->first); damage += i->second * rangelim(time_from_last_punch / full_punch_interval, 0.0, 1.0) * armor / 100.0; diff --git a/src/touchscreengui.cpp b/src/touchscreengui.cpp index f5868133f..e4f785f60 100644 --- a/src/touchscreengui.cpp +++ b/src/touchscreengui.cpp @@ -331,7 +331,7 @@ bool TouchScreenGUI::isHUDButton(const SEvent &event) { // check if hud item is pressed for (std::map >::iterator iter = m_hud_rects.begin(); - iter != m_hud_rects.end(); iter++) { + iter != m_hud_rects.end(); ++iter) { if (iter->second.isPointInside( v2s32(event.TouchInput.X, event.TouchInput.Y) @@ -510,7 +510,7 @@ void TouchScreenGUI::translateEvent(const SEvent &event) } for (std::vector::iterator iter = m_known_ids.begin(); - iter != m_known_ids.end(); iter++) { + iter != m_known_ids.end(); ++iter) { if (iter->id == event.TouchInput.ID) { m_known_ids.erase(iter); break; @@ -591,7 +591,7 @@ void TouchScreenGUI::handleChangedButton(const SEvent &event) continue; } for(std::vector::iterator iter = m_buttons[i].ids.begin(); - iter != m_buttons[i].ids.end(); iter++) { + iter != m_buttons[i].ids.end(); ++iter) { if (event.TouchInput.ID == *iter) { -- cgit v1.2.3