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:
Kelsi 2026-03-25 13:02:49 -07:00
parent 25d1a7742d
commit 03aa915a05
2 changed files with 9 additions and 14 deletions

View file

@ -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];