From 4d781df76c2c3f95de093d405b658ff2cbcda667 Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Sat, 3 Sep 2016 12:58:11 -0700 Subject: [PATCH] RecentEntries: Don't reference Entry template arg directly. --- firmware/application/recent_entries.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/firmware/application/recent_entries.hpp b/firmware/application/recent_entries.hpp index c0118f775..0f899ed0d 100644 --- a/firmware/application/recent_entries.hpp +++ b/firmware/application/recent_entries.hpp @@ -37,13 +37,13 @@ template class RecentEntries { public: using EntryType = Entry; - using Key = typename Entry::Key; - using ContainerType = std::list; + using Key = typename EntryType::Key; + using ContainerType = std::list; using const_reference = typename ContainerType::const_reference; using const_iterator = typename ContainerType::const_iterator; using RangeType = std::pair; - const Entry& on_packet(const Key key, const Packet& packet) { + const EntryType& on_packet(const Key key, const Packet& packet) { auto matching_recent = find(key); if( matching_recent != std::end(entries) ) { // Found within. Move to front of list, increment counter. @@ -67,7 +67,7 @@ public: const_iterator find(const Key key) const { return std::find_if( std::begin(entries), std::end(entries), - [key](const Entry& e) { return e.key() == key; } + [key](const EntryType& e) { return e.key() == key; } ); }