mirror of
https://github.com/xmrig/xmrig.git
synced 2024-12-22 19:49:36 +00:00
Fixed build.
This commit is contained in:
parent
ca7fb33848
commit
2fc54d240a
4 changed files with 7 additions and 7 deletions
|
@ -61,7 +61,7 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES Clang)
|
|||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Ofast -funroll-loops -fmerge-all-constants")
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fno-exceptions -fno-rtti -Wno-missing-braces")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fexceptions -fno-rtti -Wno-missing-braces")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast -funroll-loops -fmerge-all-constants")
|
||||
|
||||
if (XMRIG_ARMv8)
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
#include <memory.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
|||
|
||||
inline static const char *format(double h, char *buf, size_t size)
|
||||
{
|
||||
if (isnormal(h)) {
|
||||
if (std::isnormal(h)) {
|
||||
snprintf(buf, size, "%03.1f", h);
|
||||
return buf;
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ double xmrig::Hashrate::calc(size_t ms) const
|
|||
|
||||
for (size_t i = 0; i < m_threads; ++i) {
|
||||
data = calc(i, ms);
|
||||
if (isnormal(data)) {
|
||||
if (std::isnormal(data)) {
|
||||
result += data;
|
||||
}
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ void xmrig::Hashrate::add(size_t threadId, uint64_t count, uint64_t timestamp)
|
|||
void xmrig::Hashrate::updateHighest()
|
||||
{
|
||||
double highest = calc(ShortInterval);
|
||||
if (isnormal(highest) && highest > m_highest) {
|
||||
if (std::isnormal(highest) && highest > m_highest) {
|
||||
m_highest = highest;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -309,7 +309,7 @@ rapidjson::Value xmrig::CpuBackend::toJSON(rapidjson::Document &doc) const
|
|||
hugepages.PushBack(pages[1], allocator);
|
||||
|
||||
out.AddMember("hugepages", hugepages, allocator);
|
||||
out.AddMember("memory", d_ptr->algo.isValid() ? (ways * d_ptr->algo.memory()) : 0, allocator);
|
||||
out.AddMember("memory", static_cast<uint64_t>(d_ptr->algo.isValid() ? (ways * d_ptr->algo.memory()) : 0), allocator);
|
||||
|
||||
if (d_ptr->threads.empty() || !hashrate()) {
|
||||
return out;
|
||||
|
|
|
@ -134,7 +134,7 @@ public:
|
|||
cpu.AddMember("brand", StringRef(Cpu::info()->brand()), allocator);
|
||||
cpu.AddMember("aes", Cpu::info()->hasAES(), allocator);
|
||||
cpu.AddMember("x64", Cpu::info()->isX64(), allocator);
|
||||
cpu.AddMember("sockets", Cpu::info()->sockets(), allocator);
|
||||
cpu.AddMember("sockets", static_cast<uint64_t>(Cpu::info()->sockets()), allocator);
|
||||
|
||||
reply.AddMember("version", APP_VERSION, allocator);
|
||||
reply.AddMember("kind", APP_KIND, allocator);
|
||||
|
|
Loading…
Reference in a new issue