diff options
author | Oleksandr Koval <oleksandr.koval.dev@gmail.com> | 2021-01-05 12:32:36 (GMT) |
---|---|---|
committer | Oleksandr Koval <oleksandr.koval.dev@gmail.com> | 2021-01-05 12:32:36 (GMT) |
commit | 209daa20b2bd2ee2a76e70af58e895647f7e284f (patch) | |
tree | 081f3192927b19325f40c0da459a11e5b5a5784b /Source/cmWorkerPool.h | |
parent | 764ce15ffbe232347a41e40509a2e485bae226f6 (diff) | |
download | CMake-209daa20b2bd2ee2a76e70af58e895647f7e284f.zip CMake-209daa20b2bd2ee2a76e70af58e895647f7e284f.tar.gz CMake-209daa20b2bd2ee2a76e70af58e895647f7e284f.tar.bz2 |
Code style: add missed explicit 'this->'
CMake uses explicit 'this->' style. Using custom clang-tidy check we can
detect and fix places where 'this->' was missed.
Diffstat (limited to 'Source/cmWorkerPool.h')
-rw-r--r-- | Source/cmWorkerPool.h | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/Source/cmWorkerPool.h b/Source/cmWorkerPool.h index 0fb6707..9082d7f 100644 --- a/Source/cmWorkerPool.h +++ b/Source/cmWorkerPool.h @@ -28,7 +28,8 @@ public: void reset(); bool error() const { - return (ExitStatus != 0) || (TermSignal != 0) || !ErrorMessage.empty(); + return (this->ExitStatus != 0) || (this->TermSignal != 0) || + !this->ErrorMessage.empty(); } std::int64_t ExitStatus = 0; @@ -60,7 +61,7 @@ public: * - no jobs later in the queue will be processed before this job was * processed */ - bool IsFence() const { return Fence_; } + bool IsFence() const { return this->Fence_; } protected: /** @@ -80,13 +81,13 @@ public: * Get the worker pool. * Only valid during the JobT::Process() call! */ - cmWorkerPool* Pool() const { return Pool_; } + cmWorkerPool* Pool() const { return this->Pool_; } /** * Get the user data. * Only valid during the JobT::Process() call! */ - void* UserData() const { return Pool_->UserData(); }; + void* UserData() const { return this->Pool_->UserData(); }; /** * Get the worker index. @@ -95,7 +96,7 @@ public: * Concurrently processing jobs will never have the same WorkerIndex(). * Only valid during the JobT::Process() call! */ - unsigned int WorkerIndex() const { return WorkerIndex_; } + unsigned int WorkerIndex() const { return this->WorkerIndex_; } /** * Run an external read only process. @@ -111,8 +112,8 @@ public: //! Worker thread entry method. void Work(cmWorkerPool* pool, unsigned int workerIndex) { - Pool_ = pool; - WorkerIndex_ = workerIndex; + this->Pool_ = pool; + this->WorkerIndex_ = workerIndex; this->Process(); } @@ -150,7 +151,7 @@ public: { public: //! Does nothing - void Process() override { Pool()->Abort(); } + void Process() override { this->Pool()->Abort(); } }; public: @@ -161,7 +162,7 @@ public: /** * Number of worker threads. */ - unsigned int ThreadCount() const { return ThreadCount_; } + unsigned int ThreadCount() const { return this->ThreadCount_; } /** * Set the number of worker threads. @@ -184,7 +185,7 @@ public: * * Only valid during Process(). */ - void* UserData() const { return UserData_; } + void* UserData() const { return this->UserData_; } // -- Job processing interface @@ -212,7 +213,7 @@ public: template <class T, typename... Args> bool EmplaceJob(Args&&... args) { - return PushJob(cm::make_unique<T>(std::forward<Args>(args)...)); + return this->PushJob(cm::make_unique<T>(std::forward<Args>(args)...)); } private: |