1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-15 10:52:45 -05:00
This commit is contained in:
MoneroOcean
2019-12-04 10:52:07 -08:00
28 changed files with 65 additions and 72 deletions

View File

@@ -30,6 +30,7 @@
#include "backend/common/Hashrate.h"
#include "base/io/json/Json.h"
#include "base/tools/Chrono.h"
#include "base/tools/Handle.h"
#include "rapidjson/document.h"
@@ -157,13 +158,7 @@ const char *xmrig::Hashrate::format(double h, char *buf, size_t size)
rapidjson::Value xmrig::Hashrate::normalize(double d)
{
using namespace rapidjson;
if (!std::isnormal(d)) {
return Value(kNullType);
}
return Value(floor(d * 100.0) / 100.0);
return Json::normalize(d, false);
}