refactor: add Packet::getRemainingSize() to replace 656 arithmetic expressions

Add getRemainingSize() one-liner to Packet class and replace all 656
instances of getSize()-getReadPos() across game_handler, world_packets,
and both packet parser files.
This commit is contained in:
Kelsi 2026-03-25 12:42:56 -07:00
parent b66033c6d8
commit 376d0a0f77
5 changed files with 657 additions and 656 deletions

View file

@ -33,6 +33,7 @@ public:
const std::vector<uint8_t>& getData() const { return data; }
size_t getReadPos() const { return readPos; }
size_t getSize() const { return data.size(); }
size_t getRemainingSize() const { return data.size() - readPos; }
void setReadPos(size_t pos) { readPos = pos; }
private: