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;