mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-15 16:59:18 +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;
|
packet >> map >> size;
|
||||||
|
|
||||||
nw.resize(size);
|
nw.resize(size);
|
||||||
u8* data = new u8[size];
|
|
||||||
for (unsigned int i = 0; i < size; ++i)
|
for (unsigned int i = 0; i < size; ++i)
|
||||||
packet >> data[i];
|
packet >> nw[i];
|
||||||
nw.assign(data, data + size);
|
|
||||||
delete[] data;
|
|
||||||
|
|
||||||
// trusting server for good map value (>=0 && <4)
|
// trusting server for good map value (>=0 && <4)
|
||||||
// add to Wiimote buffer
|
// add to Wiimote buffer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user