mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 09:33:51 +00:00
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:
parent
b66033c6d8
commit
376d0a0f77
5 changed files with 657 additions and 656 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue