NetPlayClient: Remove unnecessary array allocation

This commit is contained in:
Lioncash 2015-05-24 22:53:25 -04:00
parent b4ee315a72
commit b0075966af
1 changed files with 2 additions and 4 deletions

View File

@ -339,11 +339,9 @@ unsigned int NetPlayClient::OnData(sf::Packet& packet)
packet >> map >> size;
nw.resize(size);
u8* data = new u8[size];
for (unsigned int i = 0; i < size; ++i)
packet >> data[i];
nw.assign(data, data + size);
delete[] data;
packet >> nw[i];
// trusting server for good map value (>=0 && <4)
// add to Wiimote buffer