mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-13 17:05:37 -04:00
ADSB RX App cleanup (#1569)
* WIP refactoring/gardening * WIP cleanup, adding status dots * Rename ageStep * WIP Cleanup * Wrapping up ADSB refactor/cleanup. * Don't initialize strings to " " * Better map refresh * Fix colorization of recent entries * Fit and finish
This commit is contained in:
parent
bbd1a5a2ef
commit
f4f538f69b
7 changed files with 533 additions and 432 deletions
|
@ -24,13 +24,13 @@
|
|||
|
||||
#include "ui_widget.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <list>
|
||||
#include <utility>
|
||||
#include <functional>
|
||||
#include <iterator>
|
||||
#include <algorithm>
|
||||
#include <list>
|
||||
#include <utility>
|
||||
|
||||
template <class Entry>
|
||||
using RecentEntries = std::list<Entry>;
|
||||
|
@ -42,6 +42,13 @@ typename ContainerType::const_iterator find(const ContainerType& entries, const
|
|||
[key](typename ContainerType::const_reference e) { return e.key() == key; });
|
||||
}
|
||||
|
||||
template <typename ContainerType, typename Key>
|
||||
typename ContainerType::iterator find(ContainerType& entries, const Key key) {
|
||||
return std::find_if(
|
||||
std::begin(entries), std::end(entries),
|
||||
[key](typename ContainerType::const_reference e) { return e.key() == key; });
|
||||
}
|
||||
|
||||
template <typename ContainerType>
|
||||
static void truncate_entries(ContainerType& entries, const size_t entries_max = 64) {
|
||||
while (entries.size() > entries_max) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue