From 8efeb049ca9c9f04169f25e2fc2e2a4ad28d5afc Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Wed, 13 Jan 2016 18:06:45 -0800 Subject: [PATCH] Use std::begin(), std::end() where appropriate. --- firmware/application/ais_app.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firmware/application/ais_app.cpp b/firmware/application/ais_app.cpp index a2238e26d..0ae143186 100644 --- a/firmware/application/ais_app.cpp +++ b/firmware/application/ais_app.cpp @@ -102,7 +102,7 @@ void AISLogger::on_packet(const ais::Packet& packet) { void AISRecentEntries::on_packet(const ais::Packet& packet) { const auto source_id = packet.source_id(); auto matching_recent = find_by_mmsi(source_id); - if( matching_recent != entries.end() ) { + if( matching_recent != std::end(entries) ) { // Found within. Move to front of list, increment counter. entries.push_front(*matching_recent); entries.erase(matching_recent); @@ -151,7 +151,7 @@ void AISRecentEntries::on_packet(const ais::Packet& packet) { AISRecentEntries::ContainerType::const_iterator AISRecentEntries::find_by_mmsi(const ais::MMSI key) const { return std::find_if( - begin(), end(), + std::begin(entries), std::end(entries), [key](const AISRecentEntry& e) { return e.mmsi == key; } ); }