mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-13 15:59:23 +01:00
NetPlayClient: Remove unnecessary array allocation
This commit is contained in:
parent
b4ee315a72
commit
b0075966af
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user