diff options
author | Noel Grandin <noel@peralex.com> | 2016-08-31 16:23:09 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-09-01 11:05:21 +0200 |
commit | 29285b3e9c96fdf11aac3be1ebf5ec7303b56027 (patch) | |
tree | 5fa6700b2ad2faac8ed84e30ff4967e0100b352f | |
parent | 03f14c776093eea721aa8edda4ee38ed644b5caf (diff) |
::std::list < sal_Int64 > -> std::vector
Change-Id: Ia3c3b8dd1fc3c5865ad0642cfa93430b95fae9d2
-rw-r--r-- | cppu/source/threadpool/threadpool.cxx | 18 | ||||
-rw-r--r-- | cppu/source/threadpool/threadpool.hxx | 7 |
2 files changed, 11 insertions, 14 deletions
diff --git a/cppu/source/threadpool/threadpool.cxx b/cppu/source/threadpool/threadpool.cxx index d80607507bd3..0f3199fd378a 100644 --- a/cppu/source/threadpool/threadpool.cxx +++ b/cppu/source/threadpool/threadpool.cxx @@ -72,13 +72,13 @@ namespace cppu_threadpool void DisposedCallerAdmin::destroy( sal_Int64 nDisposeId ) { MutexGuard guard( m_mutex ); - for( DisposedCallerList::iterator ii = m_lst.begin() ; - ii != m_lst.end() ; - ++ ii ) + for( auto it = m_lst.begin() ; + it != m_lst.end() ; + ++ it ) { - if( (*ii) == nDisposeId ) + if( (*it) == nDisposeId ) { - m_lst.erase( ii ); + m_lst.erase( it ); break; } } @@ -87,11 +87,11 @@ namespace cppu_threadpool bool DisposedCallerAdmin::isDisposed( sal_Int64 nDisposeId ) { MutexGuard guard( m_mutex ); - for( DisposedCallerList::iterator ii = m_lst.begin() ; - ii != m_lst.end() ; - ++ ii ) + for( auto it = m_lst.begin() ; + it != m_lst.end() ; + ++ it ) { - if( (*ii) == nDisposeId ) + if( (*it) == nDisposeId ) { return true; } diff --git a/cppu/source/threadpool/threadpool.hxx b/cppu/source/threadpool/threadpool.hxx index d1605d849911..b5587d46be44 100644 --- a/cppu/source/threadpool/threadpool.hxx +++ b/cppu/source/threadpool/threadpool.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_CPPU_SOURCE_THREADPOOL_THREADPOOL_HXX #define INCLUDED_CPPU_SOURCE_THREADPOOL_THREADPOOL_HXX -#include <list> +#include <vector> #include <unordered_map> #include <osl/conditn.hxx> @@ -63,9 +63,6 @@ namespace cppu_threadpool { EqualThreadId > ThreadIdHashMap; - typedef ::std::list < sal_Int64 > DisposedCallerList; - - struct WaitingThread { osl::Condition condition; @@ -93,7 +90,7 @@ namespace cppu_threadpool { private: ::osl::Mutex m_mutex; - DisposedCallerList m_lst; + ::std::vector< sal_Int64 > m_lst; }; class ThreadAdmin |