mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-07 06:02:20 -04:00
Extract weird range-of-entries algorithm out of view.
This commit is contained in:
parent
f8d9cb318d
commit
b1707298b7
2 changed files with 30 additions and 17 deletions
|
@ -68,7 +68,8 @@ struct AISRecentEntry {
|
|||
class AISRecentEntries {
|
||||
public:
|
||||
using ContainerType = std::list<AISRecentEntry>;
|
||||
|
||||
using RangeType = std::pair<ContainerType::const_iterator, ContainerType::const_iterator>;
|
||||
|
||||
void on_packet(const ais::Packet& packet);
|
||||
|
||||
ContainerType::const_reference front() const {
|
||||
|
@ -89,6 +90,10 @@ public:
|
|||
return entries.empty();
|
||||
}
|
||||
|
||||
RangeType range_around(
|
||||
ContainerType::const_iterator, const size_t count
|
||||
) const;
|
||||
|
||||
private:
|
||||
ContainerType entries;
|
||||
const size_t entries_max = 64;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue