From 0bfcb27002c7431d36aaa913d0f64f5a8b119d2b Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Thu, 2 Apr 2020 19:18:57 +0200 Subject: [PATCH] Added some debug info --- src/protocol/generation.cpp | 4 ---- src/protocol/generation.h | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/protocol/generation.cpp b/src/protocol/generation.cpp index 8c9bbbd..12f724f 100644 --- a/src/protocol/generation.cpp +++ b/src/protocol/generation.cpp @@ -37,8 +37,4 @@ uint16_t generation_estimator::visit_packet(uint16_t packet_id) { this->last_packet_id = packet_id; return this->last_generation; } -} - -uint16_t generation_estimator::generation() const { - return this->last_generation; } \ No newline at end of file diff --git a/src/protocol/generation.h b/src/protocol/generation.h index 9db608c..01f13f2 100644 --- a/src/protocol/generation.h +++ b/src/protocol/generation.h @@ -9,7 +9,8 @@ namespace ts::protocol { void reset(); [[nodiscard]] uint16_t visit_packet(uint16_t /* packet id */); - [[nodiscard]] uint16_t generation() const; + [[nodiscard]] inline uint16_t generation() const { return this->last_generation; } + [[nodiscard]] inline uint16_t current_packet_id() const { return this->last_packet_id; } void set_last_state(uint16_t last_packet, uint16_t generation) { this->last_packet_id = last_packet;