Skip to content
Snippets Groups Projects
Unverified Commit 010b1022 authored by psychocrypt's avatar psychocrypt Committed by GitHub
Browse files

Merge pull request #178 from neversay/master

Fix indent on hash rate report.
parents ed3e0f3d 760f5257
No related branches found
No related tags found
No related merge requests found
...@@ -625,7 +625,10 @@ inline const char* hps_format(double h, char* buf, size_t l) ...@@ -625,7 +625,10 @@ inline const char* hps_format(double h, char* buf, size_t l)
{ {
if(std::isnormal(h) || h == 0.0) if(std::isnormal(h) || h == 0.0)
{ {
snprintf(buf, l, " %03.1f", h); if(h < 10.0)
snprintf(buf, l, " %03.1f", h);
else
snprintf(buf, l, " %04.1f", h);
return buf; return buf;
} }
else else
...@@ -723,9 +726,9 @@ void executor::hashrate_report(std::string& out) ...@@ -723,9 +726,9 @@ void executor::hashrate_report(std::string& out)
std::transform(name.begin(), name.end(), name.begin(), ::toupper); std::transform(name.begin(), name.end(), name.begin(), ::toupper);
out.append("HASHRATE REPORT - ").append(name).append("\n"); out.append("HASHRATE REPORT - ").append(name).append("\n");
out.append("| ID | 10s | 60s | 15m |"); out.append("| ID | 10s | 60s | 15m |");
if(nthd != 1) if(nthd != 1)
out.append(" ID | 10s | 60s | 15m |\n"); out.append(" ID | 10s | 60s | 15m |\n");
else else
out.append(1, '\n'); out.append(1, '\n');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment