Fix mingw build
This commit is contained in:
parent
81fedde492
commit
d1f278e45b
2 changed files with 10 additions and 22 deletions
|
@ -55,6 +55,15 @@
|
|||
|
||||
#endif
|
||||
|
||||
namespace
|
||||
{
|
||||
static std::string VersionString()
|
||||
{
|
||||
std::string version = std::to_string(APP_VER_MAJOR) + std::string(".") + std::to_string(APP_VER_MINOR) +
|
||||
std::string(".") + std::to_string(APP_VER_PATCH);
|
||||
return version;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef TYPE_AMD_GPU
|
||||
xmrig::CCClient::CCClient(xmrig::Config* config, uv_async_t* async)
|
||||
|
@ -120,7 +129,7 @@ void xmrig::CCClient::updateClientInfo()
|
|||
auto cpuInfo = xmrig::Cpu::info();
|
||||
|
||||
m_clientStatus.setClientId(clientId);
|
||||
m_clientStatus.setVersion(Version::string());
|
||||
m_clientStatus.setVersion(VersionString());
|
||||
m_clientStatus.setCpuBrand(cpuInfo->brand());
|
||||
m_clientStatus.setCpuAES(cpuInfo->hasAES());
|
||||
m_clientStatus.setCpuSockets(static_cast<int>(cpuInfo->packages()));
|
||||
|
|
|
@ -62,25 +62,4 @@
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
|
||||
class Version
|
||||
{
|
||||
public:
|
||||
inline static std::string string()
|
||||
{
|
||||
std::string version = std::to_string(APP_VER_MAJOR) + std::string(".") + std::to_string(APP_VER_MINOR) +
|
||||
std::string(".") + std::to_string(APP_VER_PATCH);
|
||||
|
||||
return version;
|
||||
}
|
||||
|
||||
inline static int code()
|
||||
{
|
||||
std::string version = std::to_string(APP_VER_MAJOR) + std::to_string(APP_VER_MINOR) + std::to_string(APP_VER_PATCH);
|
||||
|
||||
return std::stoi(version);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* XMRIG_VERSION_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue