aboutsummaryrefslogtreecommitdiff
path: root/src/network/packethandlers
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2015-03-04 17:48:07 +0100
committerCraig Robbins <kde.psych@gmail.com>2015-03-05 16:49:51 +1000
commitb214cde5b4a833e1826ec6850b95bf1938c8b0a0 (patch)
tree1692546699da08769e7d5e6c10435fb037924aa3 /src/network/packethandlers
parent9e675793155d7cd56bbd2222df7b45245008c647 (diff)
downloadminetest-b214cde5b4a833e1826ec6850b95bf1938c8b0a0.tar.gz
minetest-b214cde5b4a833e1826ec6850b95bf1938c8b0a0.tar.bz2
minetest-b214cde5b4a833e1826ec6850b95bf1938c8b0a0.zip
Remove Queue class which uses std::list and use native std::queue
Diffstat (limited to 'src/network/packethandlers')
-rw-r--r--src/network/packethandlers/client.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/network/packethandlers/client.cpp b/src/network/packethandlers/client.cpp
index 1d3a343bf..e1e57b3a6 100644
--- a/src/network/packethandlers/client.cpp
+++ b/src/network/packethandlers/client.cpp
@@ -263,7 +263,7 @@ void Client::handleCommand_ChatMessage(NetworkPacket* pkt)
message += (wchar_t)read_wchar;
}
- m_chat_queue.push_back(message);
+ m_chat_queue.push(message);
}
void Client::handleCommand_ActiveObjectRemoveAdd(NetworkPacket* pkt)
@@ -380,7 +380,7 @@ void Client::handleCommand_HP(NetworkPacket* pkt)
ClientEvent event;
event.type = CE_PLAYER_DAMAGE;
event.player_damage.amount = oldhp - hp;
- m_client_event_queue.push_back(event);
+ m_client_event_queue.push(event);
}
}
@@ -424,7 +424,7 @@ void Client::handleCommand_MovePlayer(NetworkPacket* pkt)
event.type = CE_PLAYER_FORCE_MOVE;
event.player_force_move.pitch = pitch;
event.player_force_move.yaw = yaw;
- m_client_event_queue.push_back(event);
+ m_client_event_queue.push(event);
// Ignore damage for a few seconds, so that the player doesn't
// get damage from falling on ground
@@ -450,7 +450,7 @@ void Client::handleCommand_DeathScreen(NetworkPacket* pkt)
event.deathscreen.camera_point_target_x = camera_point_target.X;
event.deathscreen.camera_point_target_y = camera_point_target.Y;
event.deathscreen.camera_point_target_z = camera_point_target.Z;
- m_client_event_queue.push_back(event);
+ m_client_event_queue.push(event);
}
void Client::handleCommand_AnnounceMedia(NetworkPacket* pkt)
@@ -735,7 +735,7 @@ void Client::handleCommand_ShowFormSpec(NetworkPacket* pkt)
// adding a std:string to a struct isn't possible
event.show_formspec.formspec = new std::string(formspec);
event.show_formspec.formname = new std::string(formname);
- m_client_event_queue.push_back(event);
+ m_client_event_queue.push(event);
}
void Client::handleCommand_SpawnParticle(NetworkPacket* pkt)
@@ -766,7 +766,7 @@ void Client::handleCommand_SpawnParticle(NetworkPacket* pkt)
event.spawn_particle.vertical = vertical;
event.spawn_particle.texture = new std::string(texture);
- m_client_event_queue.push_back(event);
+ m_client_event_queue.push(event);
}
void Client::handleCommand_AddParticleSpawner(NetworkPacket* pkt)
@@ -818,7 +818,7 @@ void Client::handleCommand_AddParticleSpawner(NetworkPacket* pkt)
event.add_particlespawner.texture = new std::string(texture);
event.add_particlespawner.id = id;
- m_client_event_queue.push_back(event);
+ m_client_event_queue.push(event);
}
@@ -832,7 +832,7 @@ void Client::handleCommand_DeleteParticleSpawner(NetworkPacket* pkt)
event.type = CE_DELETE_PARTICLESPAWNER;
event.delete_particlespawner.id = (u32) id;
- m_client_event_queue.push_back(event);
+ m_client_event_queue.push(event);
}
void Client::handleCommand_HudAdd(NetworkPacket* pkt)
@@ -880,7 +880,7 @@ void Client::handleCommand_HudAdd(NetworkPacket* pkt)
event.hudadd.offset = new v2f(offset);
event.hudadd.world_pos = new v3f(world_pos);
event.hudadd.size = new v2s32(size);
- m_client_event_queue.push_back(event);
+ m_client_event_queue.push(event);
}
void Client::handleCommand_HudRemove(NetworkPacket* pkt)
@@ -892,7 +892,7 @@ void Client::handleCommand_HudRemove(NetworkPacket* pkt)
ClientEvent event;
event.type = CE_HUDRM;
event.hudrm.id = id;
- m_client_event_queue.push_back(event);
+ m_client_event_queue.push(event);
}
void Client::handleCommand_HudChange(NetworkPacket* pkt)
@@ -928,7 +928,7 @@ void Client::handleCommand_HudChange(NetworkPacket* pkt)
event.hudchange.sdata = new std::string(sdata);
event.hudchange.data = intdata;
event.hudchange.v2s32data = new v2s32(v2s32data);
- m_client_event_queue.push_back(event);
+ m_client_event_queue.push(event);
}
void Client::handleCommand_HudSetFlags(NetworkPacket* pkt)
@@ -984,7 +984,7 @@ void Client::handleCommand_HudSetSky(NetworkPacket* pkt)
event.set_sky.bgcolor = bgcolor;
event.set_sky.type = type;
event.set_sky.params = params;
- m_client_event_queue.push_back(event);
+ m_client_event_queue.push(event);
}
void Client::handleCommand_OverrideDayNightRatio(NetworkPacket* pkt)
@@ -1000,7 +1000,7 @@ void Client::handleCommand_OverrideDayNightRatio(NetworkPacket* pkt)
event.type = CE_OVERRIDE_DAY_NIGHT_RATIO;
event.override_day_night_ratio.do_override = do_override;
event.override_day_night_ratio.ratio_f = day_night_ratio_f;
- m_client_event_queue.push_back(event);
+ m_client_event_queue.push(event);
}
void Client::handleCommand_LocalPlayerAnimations(NetworkPacket* pkt)