• R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Revision28528 (tree)
Time2019-03-13 06:15:30
Authorstefankueng

Log Message

don't declare functions as throw() for c++17

Change Summary

Incremental Difference

--- trunk/src/Utils/ReaderWriterLock.cpp (revision 28527)
+++ trunk/src/Utils/ReaderWriterLock.cpp (revision 28528)
@@ -61,7 +61,7 @@
6161 DeleteCriticalSection(&m_cs);
6262 }
6363
64-bool CReaderWriterLockNonReentrance::_ReaderWait(DWORD dwTimeout) throw()
64+bool CReaderWriterLockNonReentrance::_ReaderWait(DWORD dwTimeout)
6565 {
6666 bool blCanRead;
6767
@@ -196,7 +196,7 @@
196196 return blCanWrite;
197197 }
198198
199-bool CReaderWriterLockNonReentrance::_UpgradeToWriterLockAndLeaveCS(DWORD dwTimeout) throw()
199+bool CReaderWriterLockNonReentrance::_UpgradeToWriterLockAndLeaveCS(DWORD dwTimeout)
200200 {
201201 _ASSERT(m_iNumOfReaderEntered > 0);
202202
@@ -340,7 +340,7 @@
340340 LeaveCS();
341341 }
342342
343-bool CReaderWriterLockNonReentrance::UpgradeToWriterLock(DWORD dwTimeout) throw()
343+bool CReaderWriterLockNonReentrance::UpgradeToWriterLock(DWORD dwTimeout)
344344 {
345345 EnterCS();
346346 return _UpgradeToWriterLockAndLeaveCS(dwTimeout);
@@ -546,7 +546,7 @@
546546 m_impl.LeaveCS();
547547 }
548548
549-DWORD CReaderWriterLock::GetCurrentThreadStatus() const throw()
549+DWORD CReaderWriterLock::GetCurrentThreadStatus() const
550550 {
551551 DWORD dwThreadState;
552552 const DWORD dwCurrentThreadId = GetCurrentThreadId();
--- trunk/src/Utils/ReaderWriterLock.h (revision 28527)
+++ trunk/src/Utils/ReaderWriterLock.h (revision 28528)
@@ -1,4 +1,4 @@
1-/*********************************************************************
1+/*********************************************************************
22 CReaderWriterLock: A simple and fast reader-writer lock class in C++
33 has characters of .NET ReaderWriterLock class
44 Copyright (C) 2006 Quynh Nguyen Huu
@@ -74,20 +74,20 @@
7474 class CReaderWriterLockNonReentrance
7575 {
7676 public:
77- CReaderWriterLockNonReentrance() throw();
78- ~CReaderWriterLockNonReentrance() throw();
79- bool AcquireReaderLock(DWORD dwTimeout = INFINITE) throw();
80- void ReleaseReaderLock() throw();
81- bool AcquireWriterLock(DWORD dwTimeout = INFINITE) throw();
82- void ReleaseWriterLock() throw();
83- bool TryAcquireReaderLock() throw();
84- bool TryAcquireWriterLock() throw();
85- void DowngradeFromWriterLock() throw();
77+ CReaderWriterLockNonReentrance();
78+ ~CReaderWriterLockNonReentrance();
79+ bool AcquireReaderLock(DWORD dwTimeout = INFINITE);
80+ void ReleaseReaderLock();
81+ bool AcquireWriterLock(DWORD dwTimeout = INFINITE);
82+ void ReleaseWriterLock();
83+ bool TryAcquireReaderLock();
84+ bool TryAcquireWriterLock();
85+ void DowngradeFromWriterLock();
8686
8787 // When a thread calls UpgradeToWriterLock, the reader lock is released,
8888 // and the thread goes to the end of the writer queue. Thus, other threads
8989 // might write to resources before this method returns
90- bool UpgradeToWriterLock(DWORD dwTimeout = INFINITE) throw();
90+ bool UpgradeToWriterLock(DWORD dwTimeout = INFINITE);
9191 protected:
9292 // A critical section to guard all the other members
9393 mutable CRITICAL_SECTION m_cs;
@@ -102,13 +102,13 @@
102102 // Total number of readers are waiting to be owners of this object
103103 volatile INT m_iNumOfReaderWaiting;
104104 // Internal/Real implementation
105- void EnterCS() const throw();
106- void LeaveCS() const throw();
107- bool _ReaderWait(DWORD dwTimeout) throw();
108- bool _WriterWaitAndLeaveCSIfSuccess(DWORD dwTimeout) throw();
109- bool _UpgradeToWriterLockAndLeaveCS(DWORD dwTimeout) throw();
110- void _ReaderRelease() throw();
111- void _WriterRelease(bool blDowngrade) throw();
105+ void EnterCS() const;
106+ void LeaveCS() const;
107+ bool _ReaderWait(DWORD dwTimeout);
108+ bool _WriterWaitAndLeaveCSIfSuccess(DWORD dwTimeout);
109+ bool _UpgradeToWriterLockAndLeaveCS(DWORD dwTimeout);
110+ void _ReaderRelease();
111+ void _WriterRelease(bool blDowngrade);
112112
113113 friend CReaderWriterLock;
114114 };
@@ -122,26 +122,26 @@
122122 CReaderWriterLock();
123123 ~CReaderWriterLock();
124124
125- bool AcquireReaderLock(DWORD dwTimeout = INFINITE) throw();
126- void ReleaseReaderLock() throw();
125+ bool AcquireReaderLock(DWORD dwTimeout = INFINITE);
126+ void ReleaseReaderLock();
127127
128128 // If current thread was already a reader
129129 // it will be upgraded to be writer automatically.
130130 // BE CAREFUL! Other threads might write to the resource
131131 // before current thread is successfully upgraded.
132- bool AcquireWriterLock(DWORD dwTimeout = INFINITE) throw();
133- void ReleaseWriterLock() throw();
132+ bool AcquireWriterLock(DWORD dwTimeout = INFINITE);
133+ void ReleaseWriterLock();
134134
135135 // Regardless of how many times current thread acquired reader
136136 // or writer locks, a call to this method will release all locks.
137137 // After that, any call to ReleaseWriterLock or ReleaseReaderLock
138138 // will raise exception in DEBUG mode.
139- void ReleaseAllLocks() throw();
139+ void ReleaseAllLocks();
140140
141141 // Query thread's status
142- DWORD GetCurrentThreadStatus() const throw();
142+ DWORD GetCurrentThreadStatus() const;
143143 void GetCurrentThreadStatus(DWORD* lpdwReaderLockCounter,
144- DWORD* lpdwWriterLockCounter) const throw();
144+ DWORD* lpdwWriterLockCounter) const;
145145 protected:
146146 CReaderWriterLockNonReentrance m_impl;
147147
@@ -160,11 +160,11 @@
160160 class CAutoReadLockT
161161 {
162162 public:
163- CAutoReadLockT(T& objLock) throw() : m_lock(objLock)
163+ CAutoReadLockT(T& objLock) : m_lock(objLock)
164164 {
165165 m_lock.AcquireReaderLock();
166166 }
167- ~CAutoReadLockT() throw()
167+ ~CAutoReadLockT()
168168 {
169169 m_lock.ReleaseReaderLock();
170170 }
@@ -176,11 +176,11 @@
176176 class CAutoWriteLockT
177177 {
178178 public :
179- CAutoWriteLockT(T& objLock) throw() : m_lock(objLock)
179+ CAutoWriteLockT(T& objLock) : m_lock(objLock)
180180 {
181181 m_lock.AcquireWriterLock();
182182 }
183- ~CAutoWriteLockT() throw()
183+ ~CAutoWriteLockT()
184184 {
185185 m_lock.ReleaseWriterLock();
186186 }
@@ -192,11 +192,11 @@
192192 class CAutoReadWeakLockT
193193 {
194194 public:
195- CAutoReadWeakLockT(T& objLock, DWORD timeout = 1) throw() : m_lock(objLock)
195+ CAutoReadWeakLockT(T& objLock, DWORD timeout = 1) : m_lock(objLock)
196196 {
197197 isAcquired = m_lock.AcquireReaderLock(timeout);
198198 }
199- ~CAutoReadWeakLockT() throw()
199+ ~CAutoReadWeakLockT()
200200 {
201201 if (isAcquired)
202202 m_lock.ReleaseReaderLock();
@@ -214,11 +214,11 @@
214214 class CAutoWriteWeakLockT
215215 {
216216 public :
217- CAutoWriteWeakLockT(T& objLock, DWORD timeout = 1) throw() : m_lock(objLock)
217+ CAutoWriteWeakLockT(T& objLock, DWORD timeout = 1) : m_lock(objLock)
218218 {
219219 isAcquired = m_lock.AcquireWriterLock(timeout);
220220 }
221- ~CAutoWriteWeakLockT() throw()
221+ ~CAutoWriteWeakLockT()
222222 {
223223 release();
224224 }
@@ -256,11 +256,11 @@
256256 // Inline methods
257257
258258 __forceinline
259- void CReaderWriterLockNonReentrance::EnterCS() const throw() {
259+ void CReaderWriterLockNonReentrance::EnterCS() const {
260260 ::EnterCriticalSection(&m_cs);
261261 }
262262
263263 __forceinline
264- void CReaderWriterLockNonReentrance::LeaveCS() const throw(){
264+ void CReaderWriterLockNonReentrance::LeaveCS() const{
265265 ::LeaveCriticalSection(&m_cs);
266266 }
Show on old repository browser