mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 09:33:51 +00:00
refactor: move packetHasRemaining into Packet::hasRemaining method
Add Packet::hasRemaining(size_t) and remove free function from game_handler.cpp. Replaces 8 call sites with method calls.
This commit is contained in:
parent
25d1a7742d
commit
03aa915a05
2 changed files with 9 additions and 14 deletions
|
|
@ -34,6 +34,7 @@ public:
|
|||
size_t getReadPos() const { return readPos; }
|
||||
size_t getSize() const { return data.size(); }
|
||||
size_t getRemainingSize() const { return data.size() - readPos; }
|
||||
bool hasRemaining(size_t need) const { return readPos <= data.size() && need <= (data.size() - readPos); }
|
||||
bool hasFullPackedGuid() const {
|
||||
if (readPos >= data.size()) return false;
|
||||
uint8_t mask = data[readPos];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue