RecentEntries: Extract more algorithms.

This commit is contained in:
Jared Boone 2016-09-03 18:26:48 -07:00
parent c8f7863c83
commit bd785d8bf4
4 changed files with 36 additions and 36 deletions

View file

@ -199,7 +199,7 @@ void TPMSAppView::on_packet(const tpms::Packet& packet) {
const auto reading_opt = packet.reading();
if( reading_opt.is_valid() ) {
const auto reading = reading_opt.value();
auto& entry = recent.on_packet({ reading.type(), reading.id() });
auto& entry = ::on_packet(recent, TPMSRecentEntry::Key { reading.type(), reading.id() });
entry.update(reading);
recent_entries_view.set_dirty();
}