mirror of
https://github.com/xmrig/xmrig.git
synced 2024-12-23 12:09:22 +00:00
Use null for unknown hashrate in API.
This commit is contained in:
parent
304d7bd09a
commit
378bc504fc
1 changed files with 5 additions and 3 deletions
|
@ -40,13 +40,15 @@
|
|||
#include "workers/Workers.h"
|
||||
|
||||
|
||||
static inline double normalize(double d)
|
||||
static inline rapidjson::Value normalize(double d)
|
||||
{
|
||||
using namespace rapidjson;
|
||||
|
||||
if (!isnormal(d)) {
|
||||
return 0.0;
|
||||
return Value(kNullType);
|
||||
}
|
||||
|
||||
return floor(d * 100.0) / 100.0;
|
||||
return Value(floor(d * 100.0) / 100.0);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue