mirror of
https://github.com/xmrig/xmrig.git
synced 2025-02-03 03:36:43 +00:00
Fix build without ASM.
This commit is contained in:
parent
db456a3e63
commit
466aad8543
2 changed files with 16 additions and 8 deletions
|
@ -66,11 +66,14 @@ bool xmrig::Config::read(const IJsonReader &reader, const char *fileName)
|
|||
|
||||
setAesMode(reader.getValue("hw-aes"));
|
||||
setAlgoVariant(reader.getInt("av"));
|
||||
setAssembly(reader.getValue("asm"));
|
||||
setMaxCpuUsage(reader.getInt("max-cpu-usage", 100));
|
||||
setPriority(reader.getInt("cpu-priority", -1));
|
||||
setThreads(reader.getValue("threads"));
|
||||
|
||||
# ifndef XMRIG_NO_ASM
|
||||
setAssembly(reader.getValue("asm"));
|
||||
# endif
|
||||
|
||||
return finalize();
|
||||
}
|
||||
|
||||
|
@ -194,12 +197,6 @@ void xmrig::Config::setAlgoVariant(int av)
|
|||
}
|
||||
|
||||
|
||||
void xmrig::Config::setAssembly(const rapidjson::Value &assembly)
|
||||
{
|
||||
m_assembly = Asm::parse(assembly);
|
||||
}
|
||||
|
||||
|
||||
void xmrig::Config::setMaxCpuUsage(int max)
|
||||
{
|
||||
if (max > 0 && max <= 100) {
|
||||
|
@ -278,3 +275,11 @@ xmrig::AlgoVariant xmrig::Config::getAlgoVariantLite() const
|
|||
return m_algoVariant;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef XMRIG_NO_ASM
|
||||
void xmrig::Config::setAssembly(const rapidjson::Value &assembly)
|
||||
{
|
||||
m_assembly = Asm::parse(assembly);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -85,7 +85,6 @@ private:
|
|||
bool finalize();
|
||||
void setAesMode(const rapidjson::Value &aesMode);
|
||||
void setAlgoVariant(int av);
|
||||
void setAssembly(const rapidjson::Value &assembly);
|
||||
void setMaxCpuUsage(int max);
|
||||
void setPriority(int priority);
|
||||
void setThreads(const rapidjson::Value &threads);
|
||||
|
@ -95,6 +94,10 @@ private:
|
|||
AlgoVariant getAlgoVariantLite() const;
|
||||
# endif
|
||||
|
||||
# ifndef XMRIG_NO_ASM
|
||||
void setAssembly(const rapidjson::Value &assembly);
|
||||
# endif
|
||||
|
||||
|
||||
struct Threads
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue