From 762dda43cae946e210b4df31939a9951458f6dfb Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 11 Apr 2016 08:25:20 -0400 Subject: [PATCH] CmdTags: Refactored data I/O --- src/commands/CmdTags.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/commands/CmdTags.cpp b/src/commands/CmdTags.cpp index b3c180dc..669c1731 100644 --- a/src/commands/CmdTags.cpp +++ b/src/commands/CmdTags.cpp @@ -37,10 +37,15 @@ int CmdTags (Rules& rules, Database& database) { // Generate a unique, ordered list of tags. std::vector tags; - for (auto& interval : database.getAllIntervals ()) + for (auto& line : database.allLines ()) + { + Interval interval; + interval.initialize (line); + for (auto& tag : interval.tags ()) if (std::find (tags.begin (), tags.end (), tag) == tags.end ()) tags.push_back (tag); + } // Shows all tags. Table t;