summaryrefslogtreecommitdiff
path: root/cppu
diff options
context:
space:
mode:
Diffstat (limited to 'cppu')
-rw-r--r--cppu/source/threadpool/threadpool.cxx18
-rw-r--r--cppu/source/threadpool/threadpool.hxx7
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