Code cleanup based on Clang-Tidy.
This commit is contained in:
parent
3215403815
commit
c7ac314110
133 changed files with 437 additions and 833 deletions
|
@ -1,6 +1,6 @@
|
|||
/* XMRig
|
||||
* Copyright 2018-2021 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -16,7 +16,6 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include "core/Controller.h"
|
||||
#include "backend/cpu/Cpu.h"
|
||||
#include "core/config/Config.h"
|
||||
|
@ -100,7 +99,7 @@ xmrig::Network *xmrig::Controller::network() const
|
|||
}
|
||||
|
||||
|
||||
void xmrig::Controller::execCommand(char command)
|
||||
void xmrig::Controller::execCommand(char command) const
|
||||
{
|
||||
miner()->execCommand(command);
|
||||
network()->execCommand(command);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* XMRig
|
||||
* Copyright 2018-2021 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -49,7 +49,7 @@ public:
|
|||
|
||||
Miner *miner() const;
|
||||
Network *network() const;
|
||||
void execCommand(char command);
|
||||
void execCommand(char command) const;
|
||||
|
||||
private:
|
||||
std::shared_ptr<Miner> m_miner;
|
||||
|
|
|
@ -78,7 +78,7 @@ public:
|
|||
XMRIG_DISABLE_COPY_MOVE_DEFAULT(MinerPrivate)
|
||||
|
||||
|
||||
inline MinerPrivate(Controller *controller) : controller(controller) {}
|
||||
inline explicit MinerPrivate(Controller *controller) : controller(controller) {}
|
||||
|
||||
|
||||
inline ~MinerPrivate()
|
||||
|
@ -329,7 +329,7 @@ public:
|
|||
|
||||
|
||||
# ifdef XMRIG_ALGO_RANDOMX
|
||||
inline bool initRX() { return Rx::init(job, controller->config()->rx(), controller->config()->cpu()); }
|
||||
inline bool initRX() const { return Rx::init(job, controller->config()->rx(), controller->config()->cpu()); }
|
||||
# endif
|
||||
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include <algorithm>
|
||||
#include <cinttypes>
|
||||
#include <cstring>
|
||||
|
@ -112,7 +111,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace xmrig
|
||||
|
||||
|
||||
xmrig::Config::Config() :
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include "core/config/ConfigTransform.h"
|
||||
#include "base/kernel/interfaces/IConfig.h"
|
||||
#include "base/net/stratum/Pool.h"
|
||||
|
@ -354,6 +353,9 @@ void xmrig::ConfigTransform::transformBenchmark(rapidjson::Document &doc, int ke
|
|||
|
||||
case IConfig::UserKey: /* --user */
|
||||
return set(doc, BenchConfig::kBenchmark, BenchConfig::kUser, arg);
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue