mirror of
https://github.com/eosswedenorg/antelope-keygen
synced 2026-06-18 04:00:03 +02:00
Merge branch 'compiler-warnings' into develop
This commit is contained in:
parent
2b20f8aaf4
commit
2d1696a0e4
7 changed files with 24 additions and 16 deletions
|
|
@ -1,4 +1,5 @@
|
|||
|
||||
#include <cstddef>
|
||||
#include <thread>
|
||||
#include <mutex>
|
||||
#include <vector>
|
||||
|
|
@ -7,10 +8,10 @@
|
|||
#include "key_search.h"
|
||||
|
||||
// Max keys to search for,
|
||||
unsigned int g_max;
|
||||
std::size_t g_max;
|
||||
|
||||
// How many keys we have found so far.
|
||||
unsigned int g_count;
|
||||
std::size_t g_count;
|
||||
|
||||
// Mutex guard for g_count.
|
||||
std::mutex g_count_mtx;
|
||||
|
|
@ -60,7 +61,7 @@ void KeySearch::_search_mt(size_t n)
|
|||
g_count = 0;
|
||||
|
||||
// Launch them.
|
||||
for(int i = 0; i < t.size(); i++) {
|
||||
for(std::size_t i = 0; i < t.size(); i++) {
|
||||
t[i] = std::thread(_thr_proc, m_words);
|
||||
}
|
||||
|
||||
|
|
@ -68,7 +69,7 @@ void KeySearch::_search_mt(size_t n)
|
|||
_thr_proc(m_words);
|
||||
|
||||
// Wait for all threads to compelete.
|
||||
for(int i = 0; i < t.size(); i++) {
|
||||
for(std::size_t i = 0; i < t.size(); i++) {
|
||||
t[i].join();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue