diff options
author | ChaosMarc <ChaosMarc@gmx.de> | 2018-01-05 12:30:25 +0100 |
---|---|---|
committer | ChaosMarc <ChaosMarc@gmx.de> | 2018-01-05 12:30:25 +0100 |
commit | 7b3f2942d3dafa042fe5b99aec209b200a3071d9 (patch) | |
tree | 5974dd9074810d9f08757060537633244dca4210 | |
parent | 78cf4351d9130b7ceac5dca700afdf742111941d (diff) | |
download | xmr-stak-7b3f2942d3dafa042fe5b99aec209b200a3071d9.zip xmr-stak-7b3f2942d3dafa042fe5b99aec209b200a3071d9.tar.gz |
display 0.0 instead of (na) for totals
-rw-r--r-- | xmrstak/misc/executor.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/xmrstak/misc/executor.cpp b/xmrstak/misc/executor.cpp index 680f045..6d06411 100644 --- a/xmrstak/misc/executor.cpp +++ b/xmrstak/misc/executor.cpp @@ -776,14 +776,14 @@ void executor::hashrate_report(std::string& out) out.append(hps_format(fHps[0], num, sizeof(num))).append(" |"); out.append(hps_format(fHps[1], num, sizeof(num))).append(" |"); out.append(hps_format(fHps[2], num, sizeof(num))).append(1, ' '); - - fTotal[0] += fHps[0]; - fTotal[1] += fHps[1]; - fTotal[2] += fHps[2]; - fTotalCur[0] += fHps[0]; - fTotalCur[1] += fHps[1]; - fTotalCur[2] += fHps[2]; + fTotal[0] += (std::isnormal(fHps[0])) ? fHps[0] : 0.0; + fTotal[0] += (std::isnormal(fHps[1])) ? fHps[1] : 0.0; + fTotal[0] += (std::isnormal(fHps[2])) ? fHps[2] : 0.0; + + fTotalCur[0] += (std::isnormal(fHps[0])) ? fHps[0] : 0.0; + fTotalCur[0] += (std::isnormal(fHps[1])) ? fHps[1] : 0.0; + fTotalCur[0] += (std::isnormal(fHps[2])) ? fHps[2] : 0.0; if((i & 0x1) == 1) //Odd i's out.append("|\n"); |