Merge pull request #2450 from lioncash/alloc

NetPlayClient: Remove unnecessary array allocation
This commit is contained in:
Ryan Houdek 2015-05-25 23:42:49 -04:00
commit 96ef0fce38
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