mirror of
https://github.com/xmrig/xmrig.git
synced 2024-11-17 16:27:44 +00:00
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])));
|
||||
|
||||
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);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < size; i++) {
|
||||
if (algoNamesShort[i] && strcasecmp(algo, algoNamesShort[i]) == 0) {
|
||||
m_algorithm = static_cast<xmrig::Algo>(i);
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue