Database: firstLine -> getLatestEntry

firstLine is ambiguous (the first line that was added in time? The first line
that will be returned when iterating the database?)

See https://github.com/GothenburgBitFactory/timewarrior/pull/269#discussion_r367922757
This commit is contained in:
Shaun Ruffell 2020-01-18 16:30:22 -06:00 committed by lauft
parent c7c1ea632a
commit 1abf6e9320
3 changed files with 5 additions and 5 deletions

View file

@ -784,10 +784,10 @@ std::vector <Range> getUntracked (
Interval getLatestInterval (Database& database)
{
Interval i;
auto firstLine = database.firstLine ();
if (! firstLine.empty ())
auto latestEntry = database.getLatestEntry ();
if (! latestEntry.empty ())
{
i = IntervalFactory::fromSerialization (firstLine);
i = IntervalFactory::fromSerialization (latestEntry);
}
return i;