1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-10 17:12:46 -05:00

Code cleanup based on Clang-Tidy.

This commit is contained in:
XMRig
2021-08-25 18:45:15 +07:00
parent 3215403815
commit c7ac314110
133 changed files with 437 additions and 833 deletions

View File

@@ -1,7 +1,7 @@
/* XMRig
* Copyright (c) 2018-2019 tevador <tevador@gmail.com>
* Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2020 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
@@ -17,7 +17,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "crypto/rx/RxNUMAStorage.h"
#include "backend/cpu/Cpu.h"
#include "backend/cpu/platform/HwlocCpuInfo.h"
@@ -79,7 +78,7 @@ class RxNUMAStoragePrivate
public:
XMRIG_DISABLE_COPY_MOVE_DEFAULT(RxNUMAStoragePrivate)
inline RxNUMAStoragePrivate(const std::vector<uint32_t> &nodeset) :
inline explicit RxNUMAStoragePrivate(const std::vector<uint32_t> &nodeset) :
m_nodeset(nodeset)
{
m_threads.reserve(nodeset.size());
@@ -230,7 +229,7 @@ private:
std::lock_guard<std::mutex> lock(mutex);
d_ptr->m_datasets.insert({ nodeId, dataset });
d_ptr->printAllocStatus(dataset, nodeId, ts);
RxNUMAStoragePrivate::printAllocStatus(dataset, nodeId, ts);
}
@@ -251,7 +250,7 @@ private:
std::lock_guard<std::mutex> lock(mutex);
d_ptr->m_cache = cache;
d_ptr->printAllocStatus(cache, nodeId, ts);
RxNUMAStoragePrivate::printAllocStatus(cache, nodeId, ts);
}
@@ -265,7 +264,7 @@ private:
}
void printAllocStatus(RxDataset *dataset, uint32_t nodeId, uint64_t ts)
static void printAllocStatus(RxDataset *dataset, uint32_t nodeId, uint64_t ts)
{
const auto pages = dataset->hugePages();
@@ -280,7 +279,7 @@ private:
}
void printAllocStatus(RxCache *cache, uint32_t nodeId, uint64_t ts)
static void printAllocStatus(RxCache *cache, uint32_t nodeId, uint64_t ts)
{
const auto pages = cache->hugePages();
@@ -296,7 +295,7 @@ private:
}
void printAllocStatus(uint64_t ts)
void printAllocStatus(uint64_t ts) const
{
auto pages = hugePages();