Skip to content
Permalink
Browse files

Make Chart::render return a string instead of writing to std::cout (f…

…ixup)
  • Loading branch information...
lauft committed Jan 31, 2019
1 parent 8e649a9 commit 22902fe9a1017337541ed33bd4ff1df10c02ec57
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/Chart.cpp
@@ -363,10 +363,10 @@ std::string Chart::renderTotal (time_t work)
{
int hours = work / 3600;
int minutes = (work % 3600) / 60;
std::cout << " "
<< std::setw (3) << std::setfill (' ') << hours
<< ':'
<< std::setw (2) << std::setfill ('0') << minutes;
out << " "
<< std::setw (3) << std::setfill (' ') << hours
<< ':'
<< std::setw (2) << std::setfill ('0') << minutes;
}

return out.str ();

0 comments on commit 22902fe

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.