diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-10-10 21:29:05 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-10-10 21:29:05 -0500 |
commit | 90090c56845dcd942638a2852b9a09e3972d05d6 (patch) | |
tree | 42b8d8b8b66a8fb8f98ca83bd6abfbd3319402bd /linguistic | |
parent | 88e1f3d8f884c326aaf92ad0e18e96ece244b8da (diff) |
merge vosremoval-thread patch
Diffstat (limited to 'linguistic')
-rw-r--r-- | linguistic/source/lngopt.cxx | 8 | ||||
-rw-r--r-- | linguistic/source/lngopt.hxx | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/linguistic/source/lngopt.cxx b/linguistic/source/lngopt.cxx index 77a1fcbd57b0..42fa463e8a0a 100644 --- a/linguistic/source/lngopt.cxx +++ b/linguistic/source/lngopt.cxx @@ -64,7 +64,7 @@ using namespace com::sun::star::registry; // static member intialization SvtLinguOptions * LinguOptions::pData = NULL; -vos::ORefCount LinguOptions::aRefCount; +oslInterlockedCount LinguOptions::nRefCount; LinguOptions::LinguOptions() @@ -76,14 +76,14 @@ LinguOptions::LinguOptions() aLinguCfg.GetOptions( *pData ); } - ++aRefCount; + osl_incrementInterlockedCount( &nRefCount ); } LinguOptions::LinguOptions(const LinguOptions & /*rOpt*/) { DBG_ASSERT( pData, "lng : data missing" ); - ++aRefCount; + osl_incrementInterlockedCount( &nRefCount ); } @@ -91,7 +91,7 @@ LinguOptions::~LinguOptions() { MutexGuard aGuard( GetLinguMutex() ); - if (--aRefCount == 0) + if ( osl_decrementInterlockedCount( &nRefCount ) == 0 ) { delete pData; pData = NULL; } diff --git a/linguistic/source/lngopt.hxx b/linguistic/source/lngopt.hxx index 7e86f31fc437..be3853fcc06c 100644 --- a/linguistic/source/lngopt.hxx +++ b/linguistic/source/lngopt.hxx @@ -68,7 +68,7 @@ namespace com { namespace sun { namespace star { class LinguOptions { static SvtLinguOptions *pData; - static vos::ORefCount aRefCount; // number of objects of this class + static oslInterlockedCount nRefCount; // number of objects of this class //! uses default assignment-operator |