mirror of
https://github.com/xmrig/xmrig.git
synced 2024-11-06 00:17:39 +00:00
Fixed numeric variant 2 in config file.
This commit is contained in:
parent
075565e6fa
commit
85946b0c40
2 changed files with 19 additions and 7 deletions
|
@ -6,6 +6,7 @@
|
|||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* Copyright 2018 Lee Clagett <https://github.com/vtnerd>
|
||||
* Copyright 2018 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2018 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
@ -176,11 +177,21 @@ void xmrig::Algorithm::parseVariant(const char *variant)
|
|||
|
||||
void xmrig::Algorithm::parseVariant(int variant)
|
||||
{
|
||||
if (variant >= VARIANT_AUTO && variant < VARIANT_MAX) {
|
||||
assert(variant >= -1 && variant <= 2);
|
||||
|
||||
switch (variant) {
|
||||
case -1:
|
||||
case 0:
|
||||
case 1:
|
||||
m_variant = static_cast<Variant>(variant);
|
||||
}
|
||||
else {
|
||||
assert(false);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
m_variant = VARIANT_2;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* Copyright 2018 Lee Clagett <https://github.com/vtnerd>
|
||||
* Copyright 2018 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2018 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
@ -22,8 +23,8 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __ALGORITHM_H__
|
||||
#define __ALGORITHM_H__
|
||||
#ifndef XMRIG_ALGORITHM_H
|
||||
#define XMRIG_ALGORITHM_H
|
||||
|
||||
|
||||
#include <vector>
|
||||
|
|
Loading…
Reference in a new issue