mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
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:
parent
c7c1ea632a
commit
1abf6e9320
3 changed files with 5 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue