Better implementation for algorithm aliases.
This commit is contained in:
parent
bb2faaddc0
commit
eb56c2b56e
1 changed files with 2 additions and 9 deletions
|
@ -388,16 +388,9 @@ void xmrig::CommonConfig::setAlgo(const char *algo)
|
||||||
assert(size == (sizeof(algoNamesShort) / sizeof(algoNamesShort[0])));
|
assert(size == (sizeof(algoNamesShort) / sizeof(algoNamesShort[0])));
|
||||||
|
|
||||||
for (size_t i = 0; i < size; i++) {
|
for (size_t i = 0; i < size; i++) {
|
||||||
if (algoNames[i] && strcasecmp(algo, algoNames[i]) == 0) {
|
if (strcasecmp(algo, algoNames[i]) == 0 || strcasecmp(algo, algoNamesShort[i]) == 0) {
|
||||||
m_algorithm = static_cast<Algo>(i);
|
m_algorithm = static_cast<Algo>(i);
|
||||||
return;
|
break;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (size_t i = 0; i < size; i++) {
|
|
||||||
if (algoNamesShort[i] && strcasecmp(algo, algoNamesShort[i]) == 0) {
|
|
||||||
m_algorithm = static_cast<xmrig::Algo>(i);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue