quick check with linters
This commit is contained in:
@@ -47,7 +47,7 @@ class ThreadPool : public Task {
|
||||
runnable onComplete = nullptr;
|
||||
std::atomic<int> busyWorkers = 0;
|
||||
std::atomic<uint> jobsDone = 0;
|
||||
bool working = true;
|
||||
std::atomic<bool> working = true;
|
||||
bool failed = false;
|
||||
bool standaloneResults = true;
|
||||
bool stopOnFail = true;
|
||||
@@ -170,7 +170,7 @@ public:
|
||||
onJobFailed(entry.job);
|
||||
}
|
||||
if (stopOnFail) {
|
||||
std::lock_guard<std::mutex> lock(jobsMutex);
|
||||
std::lock_guard<std::mutex> jobsLock(jobsMutex);
|
||||
failed = true;
|
||||
complete = false;
|
||||
}
|
||||
@@ -184,7 +184,7 @@ public:
|
||||
}
|
||||
|
||||
if (onComplete && busyWorkers == 0) {
|
||||
std::lock_guard<std::mutex> lock(jobsMutex);
|
||||
std::lock_guard<std::mutex> jobsLock(jobsMutex);
|
||||
if (jobs.empty()) {
|
||||
onComplete();
|
||||
complete = true;
|
||||
|
||||
@@ -269,7 +269,6 @@ std::string util::mangleid(uint64_t value) {
|
||||
// todo: use base64
|
||||
std::stringstream ss;
|
||||
ss << std::hex << value;
|
||||
std::string result(ss.str());
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
@@ -434,7 +433,7 @@ std::string util::format_data_size(size_t size) {
|
||||
" B", " KiB", " MiB", " GiB", " TiB", " EiB", " PiB"
|
||||
};
|
||||
int group = 0;
|
||||
size_t remainder;
|
||||
size_t remainder = 0;
|
||||
while (size >= 1024) {
|
||||
group++;
|
||||
remainder = size % 1024;
|
||||
|
||||
Reference in New Issue
Block a user