mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
CmdChart: Added assert for non-negative totals
This commit is contained in:
parent
1dc8eb7b4f
commit
44e5dd7b84
1 changed files with 2 additions and 0 deletions
|
@ -36,6 +36,7 @@
|
|||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <cassert>
|
||||
|
||||
int renderChart (const CLI&, const std::string&, Interval&, Rules&, Database&);
|
||||
static void determineHourRange (const std::string&, const Rules&, const Interval&, const std::vector <Interval>&, int&, int&);
|
||||
|
@ -652,6 +653,7 @@ static std::string renderSummary (
|
|||
}
|
||||
|
||||
auto total_available = filter.range.total () - total_unavailable;
|
||||
assert (total_available >= 0);
|
||||
auto total_remaining = total_available - total_worked;
|
||||
|
||||
out << '\n'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue