Make Chart::render return a string instead of writing to std::cout (fixup)

This commit is contained in:
Thomas Lauf 2019-01-31 23:16:48 +01:00
parent 8e649a9456
commit 22902fe9a1

View file

@ -363,10 +363,10 @@ std::string Chart::renderTotal (time_t work)
{ {
int hours = work / 3600; int hours = work / 3600;
int minutes = (work % 3600) / 60; int minutes = (work % 3600) / 60;
std::cout << " " out << " "
<< std::setw (3) << std::setfill (' ') << hours << std::setw (3) << std::setfill (' ') << hours
<< ':' << ':'
<< std::setw (2) << std::setfill ('0') << minutes; << std::setw (2) << std::setfill ('0') << minutes;
} }
return out.str (); return out.str ();