From 69120f9a479c9fc5e52740b2c2fb1e00d9ce3257 Mon Sep 17 00:00:00 2001 From: Sup Yut Sum Date: Mon, 21 Jan 2013 07:44:52 +0800 Subject: [PATCH] Sync AsyncFramework from TortoiseSVN Based on TortoiseSVN revision 23820, 23826 Signed-off-by: Sup Yut Sum --- src/AsyncFramework/CriticalSection.h | 4 +++- src/AsyncFramework/JobScheduler.cpp | 2 +- src/AsyncFramework/JobScheduler.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/AsyncFramework/CriticalSection.h b/src/AsyncFramework/CriticalSection.h index 176d1f3dd..30bd5e77f 100644 --- a/src/AsyncFramework/CriticalSection.h +++ b/src/AsyncFramework/CriticalSection.h @@ -78,7 +78,9 @@ private: CCriticalSection& section; // dummy assignement operator to silence the C4512 compiler warning - CCriticalSectionLock & operator=( const CCriticalSectionLock & ) {} + // not implemented assigment operator (even is dummy and private) to + // get rid of cppcheck error as well as accidental use + CCriticalSectionLock & operator=( const CCriticalSectionLock & ) /*{ section = ; return * this; }*/; public: __forceinline CCriticalSectionLock (CCriticalSection& section) diff --git a/src/AsyncFramework/JobScheduler.cpp b/src/AsyncFramework/JobScheduler.cpp index 371afe8a4..37220d12a 100644 --- a/src/AsyncFramework/JobScheduler.cpp +++ b/src/AsyncFramework/JobScheduler.cpp @@ -183,7 +183,7 @@ void CJobScheduler::CThreadPool::SetThreadCount (size_t count) } } -size_t CJobScheduler::CThreadPool::GetThreadCount() +size_t CJobScheduler::CThreadPool::GetThreadCount() const { return maxCount; } diff --git a/src/AsyncFramework/JobScheduler.h b/src/AsyncFramework/JobScheduler.h index a305045d7..95d82b60f 100644 --- a/src/AsyncFramework/JobScheduler.h +++ b/src/AsyncFramework/JobScheduler.h @@ -304,7 +304,7 @@ private: /// get maximum number of shared threads - size_t GetThreadCount(); + size_t GetThreadCount() const; /// manage starving schedulers /// (must be notified as soon as there is an idle thread) -- 2.11.4.GIT