mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-02 09:46:52 -05:00
refactor: Use member initializers in CCheckQueue
This commit is contained in:
parent
1b313cacc9
commit
0ef938685b
1 changed files with 9 additions and 6 deletions
|
@ -44,23 +44,23 @@ private:
|
|||
std::vector<T> queue;
|
||||
|
||||
//! The number of workers (including the master) that are idle.
|
||||
int nIdle;
|
||||
int nIdle{0};
|
||||
|
||||
//! The total number of workers (including the master).
|
||||
int nTotal;
|
||||
int nTotal{0};
|
||||
|
||||
//! The temporary evaluation result.
|
||||
bool fAllOk;
|
||||
bool fAllOk{true};
|
||||
|
||||
/**
|
||||
* Number of verifications that haven't completed yet.
|
||||
* This includes elements that are no longer queued, but still in the
|
||||
* worker's own batches.
|
||||
*/
|
||||
unsigned int nTodo;
|
||||
unsigned int nTodo{0};
|
||||
|
||||
//! The maximum number of elements to be processed in one batch
|
||||
unsigned int nBatchSize;
|
||||
const unsigned int nBatchSize;
|
||||
|
||||
/** Internal function that does bulk of the verification work. */
|
||||
bool Loop(bool fMaster = false)
|
||||
|
@ -127,7 +127,10 @@ public:
|
|||
boost::mutex ControlMutex;
|
||||
|
||||
//! Create a new check queue
|
||||
explicit CCheckQueue(unsigned int nBatchSizeIn) : nIdle(0), nTotal(0), fAllOk(true), nTodo(0), nBatchSize(nBatchSizeIn) {}
|
||||
explicit CCheckQueue(unsigned int nBatchSizeIn)
|
||||
: nBatchSize(nBatchSizeIn)
|
||||
{
|
||||
}
|
||||
|
||||
//! Worker thread
|
||||
void Thread()
|
||||
|
|
Loading…
Add table
Reference in a new issue