Commit 70b7ca14 by Anselme

removed type ambiguity

parent 75343655
......@@ -57,7 +57,8 @@ sf::Packet& operator <<(sf::Packet& packet, const MapKoban& map)
packet << map.m_width << map.m_height;
for(unsigned int i=0; i<map.m_tiles.size(); ++i)
packet << int(map.m_tiles[i]);
packet << map.m_crates.size();
unsigned int nbCrates = map.m_crates.size();
packet << nbCrates;
for(const Crate& c : map.m_crates)
packet << c.position.x << c.position.y;
return packet;
......@@ -69,7 +70,7 @@ sf::Packet& operator >>(sf::Packet& packet, MapKoban& map)
map.m_tiles = std::vector<int>(map.m_width*map.m_height);
for(unsigned int i=0; i<map.m_tiles.size(); ++i)
packet >> (int&)map.m_tiles[i];
unsigned int nbCrates;
std::vector<Crate>::size_type nbCrates;
packet >> nbCrates;
for(unsigned int i=0; i<nbCrates; ++i)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment