Use RxAlgo:base instead of switch.

This commit is contained in:
XMRig 2019-09-14 12:00:33 +07:00
parent bee01544c5
commit 8a69c23646
3 changed files with 8 additions and 23 deletions

View file

@ -37,7 +37,7 @@ xmrig::Algorithm::Id xmrig::RxAlgo::apply(Algorithm::Id algorithm)
}
RandomX_ConfigurationBase *xmrig::RxAlgo::base(Algorithm::Id algorithm)
const RandomX_ConfigurationBase *xmrig::RxAlgo::base(Algorithm::Id algorithm)
{
switch (algorithm) {
case Algorithm::RX_WOW:

View file

@ -46,7 +46,7 @@ class RxAlgo
{
public:
static Algorithm::Id apply(Algorithm::Id algorithm);
static RandomX_ConfigurationBase *base(Algorithm::Id algorithm);
static const RandomX_ConfigurationBase *base(Algorithm::Id algorithm);
static uint32_t programCount(Algorithm::Id algorithm);
static uint32_t programIterations(Algorithm::Id algorithm);
static uint32_t programSize(Algorithm::Id algorithm);