From 5ab454767b83e5a84ff034b6344dd7dc50861c19 Mon Sep 17 00:00:00 2001 From: Frank Li Date: Sat, 20 Mar 2010 15:56:15 +0800 Subject: [PATCH] Use AutoLocker status Signed-off-by: Frank Li --- src/Git/GitStatus.cpp | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/Git/GitStatus.cpp b/src/Git/GitStatus.cpp index 37b5b723e..8a145edba 100644 --- a/src/Git/GitStatus.cpp +++ b/src/Git/GitStatus.cpp @@ -983,27 +983,13 @@ void GitStatus::ClearFilter() #endif // _MFC_VER -class CAutoLock -{ - CComCriticalSection *m_lock; -public: - CAutoLock(CComCriticalSection *lock) - { - m_lock=lock; - m_lock->Lock(); - } - ~CAutoLock() - { - m_lock->Unlock(); - } -}; int GitStatus::GetFileStatus(CString &gitdir,CString &path,git_wc_status_kind * status,BOOL IsFull, BOOL IsRecursive,FIll_STATUS_CALLBACK callback,void *pData) { TCHAR oldpath[MAX_PATH+1]; memset(oldpath,0,MAX_PATH+1); - CAutoLock lock(&g_Git.m_critGitDllSec); + AutoLocker lock(g_Git.m_critGitDllSec); if(gitdir != g_Git.m_CurrentDir) { -- 2.11.4.GIT