Changed init signature.

This commit is contained in:
XMRig 2019-08-05 16:00:48 +07:00
parent a8e86c3530
commit 044fbd7e82
4 changed files with 6 additions and 6 deletions

View file

@ -62,7 +62,7 @@ xmrig::RxCache::~RxCache()
}
bool xmrig::RxCache::init(const void *seed)
bool xmrig::RxCache::init(const uint8_t *seed)
{
if (isReady(seed)) {
return false;
@ -75,7 +75,7 @@ bool xmrig::RxCache::init(const void *seed)
}
bool xmrig::RxCache::isReady(const void *seed) const
bool xmrig::RxCache::isReady(const uint8_t *seed) const
{
return memcmp(m_seed, seed, sizeof(m_seed)) == 0;
}

View file

@ -52,12 +52,12 @@ public:
inline const uint8_t *seed() const { return m_seed; }
inline randomx_cache *get() const { return m_cache; }
bool init(const void *seed);
bool init(const uint8_t *seed);
static inline constexpr size_t size() { return RANDOMX_CACHE_MAX_SIZE; }
private:
bool isReady(const void *seed) const;
bool isReady(const uint8_t *seed) const;
int m_flags = 0;
randomx_cache *m_cache = nullptr;

View file

@ -64,7 +64,7 @@ xmrig::RxDataset::~RxDataset()
}
bool xmrig::RxDataset::init(const void *seed, uint32_t numThreads)
bool xmrig::RxDataset::init(const uint8_t *seed, uint32_t numThreads)
{
cache()->init(seed);

View file

@ -52,7 +52,7 @@ public:
inline randomx_dataset *get() const { return m_dataset; }
inline RxCache *cache() const { return m_cache; }
bool init(const void *seed, uint32_t numThreads);
bool init(const uint8_t *seed, uint32_t numThreads);
std::pair<size_t, size_t> hugePages() const;
static inline constexpr size_t size() { return RANDOMX_DATASET_MAX_SIZE; }