mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-14 03:38:33 +00:00
Packets take SerializeBuffer via move
The existing implemented behavior is that of a transfer of ownership, however it does it without move semantics. This doesn't change the behavior but makes it explicitly clear that there is a transfer of ownership via enforced move semantics. Also includes some cleanup in the packet classes, including converting the size parameter to size_t. While no packet will ever be large enough to require 64-bits of size, many places that are initializing packets are doing so with a size_t parameter, so this will address those warnings here.
This commit is contained in:
@@ -2711,7 +2711,7 @@ namespace UF
|
||||
|
||||
buf.WriteString(new_message);
|
||||
|
||||
auto outapp = new EQApplicationPacket(OP_SpecialMesg, buf);
|
||||
auto outapp = new EQApplicationPacket(OP_SpecialMesg, std::move(buf));
|
||||
|
||||
dest->FastQueuePacket(&outapp, ack_req);
|
||||
delete in;
|
||||
|
||||
Reference in New Issue
Block a user