From 3c91ad8fc2b7a7888503e85d31bfe286afa6560d Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Tue, 17 Feb 2015 15:04:08 +0100 Subject: Replace std::list by std::vector into timerUpdate calls --- src/client.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/client.cpp') diff --git a/src/client.cpp b/src/client.cpp index 38ce54bdc..17661d0c1 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -434,7 +434,7 @@ void Client::step(float dtime) const float map_timer_and_unload_dtime = 5.25; if(m_map_timer_and_unload_interval.step(dtime, map_timer_and_unload_dtime)) { ScopeProfiler sp(g_profiler, "Client: map timer and unload"); - std::list deleted_blocks; + std::vector deleted_blocks; m_env.getMap().timerUpdate(map_timer_and_unload_dtime, g_settings->getFloat("client_unload_unused_data_timeout"), &deleted_blocks); @@ -444,8 +444,8 @@ void Client::step(float dtime) NOTE: This loop is intentionally iterated the way it is. */ - std::list::iterator i = deleted_blocks.begin(); - std::list sendlist; + std::vector::iterator i = deleted_blocks.begin(); + std::vector sendlist; for(;;) { if(sendlist.size() == 255 || i == deleted_blocks.end()) { if(sendlist.empty()) @@ -462,7 +462,7 @@ void Client::step(float dtime) *pkt << (u8) sendlist.size(); u32 k = 0; - for(std::list::iterator + for(std::vector::iterator j = sendlist.begin(); j != sendlist.end(); ++j) { *pkt << *j; -- cgit v1.2.3