Drop intermediate list of files from log reading
We are saving a temporary variable in a ton of places for the lifetime
of the program. Inline it so we can change the return type.
Change-Id: If8d90ffd07806644aceed4c44087e5fd206c8df9
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
diff --git a/y2020/vision/viewer_replay.cc b/y2020/vision/viewer_replay.cc
index a818859..03777bc 100644
--- a/y2020/vision/viewer_replay.cc
+++ b/y2020/vision/viewer_replay.cc
@@ -17,11 +17,9 @@
namespace {
void ViewerMain(int argc, char *argv[]) {
- std::vector<std::string> unsorted_logfiles =
- aos::logger::FindLogs(argc, argv);
-
// open logfiles
- aos::logger::LogReader reader(aos::logger::SortParts(unsorted_logfiles));
+ aos::logger::LogReader reader(
+ aos::logger::SortParts(aos::logger::FindLogs(argc, argv)));
reader.Register();
const aos::Node *node = nullptr;
if (aos::configuration::MultiNode(reader.configuration())) {