mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-02 15:53:51 +00:00
refactor: add Packet::skipAll() to replace 186 setReadPos(getSize()) calls
Add skipAll() convenience method and replace 186 instances of the verbose 'discard remaining packet data' idiom across game_handler and world_packets.
This commit is contained in:
parent
4309c8c69b
commit
0d9aac2656
3 changed files with 187 additions and 186 deletions
|
|
@ -46,6 +46,7 @@ public:
|
|||
return getRemainingSize() >= guidBytes;
|
||||
}
|
||||
void setReadPos(size_t pos) { readPos = pos; }
|
||||
void skipAll() { readPos = data.size(); }
|
||||
|
||||
private:
|
||||
uint16_t opcode = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue