#196 Fix Linux build.
This commit is contained in:
@@ -23,8 +23,9 @@
|
||||
|
||||
|
||||
#include <chrono>
|
||||
#include <cmath>
|
||||
#include <math.h>
|
||||
#include <memory.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "log/Log.h"
|
||||
#include "Options.h"
|
||||
@@ -33,7 +34,7 @@
|
||||
|
||||
inline const char *format(double h, char* buf, size_t size)
|
||||
{
|
||||
if (std::isnormal(h)) {
|
||||
if (isnormal(h)) {
|
||||
snprintf(buf, size, "%03.1f", h);
|
||||
return buf;
|
||||
}
|
||||
@@ -77,7 +78,7 @@ double Hashrate::calc(size_t ms) const
|
||||
|
||||
for (int i = 0; i < m_threads; ++i) {
|
||||
data = calc(i, ms);
|
||||
if (std::isnormal(data)) {
|
||||
if (isnormal(data)) {
|
||||
result += data;
|
||||
}
|
||||
}
|
||||
@@ -170,7 +171,7 @@ void Hashrate::stop()
|
||||
void Hashrate::updateHighest()
|
||||
{
|
||||
double highest = calc(ShortInterval);
|
||||
if (std::isnormal(highest) && highest > m_highest) {
|
||||
if (isnormal(highest) && highest > m_highest) {
|
||||
m_highest = highest;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user