diff options
author | Noel Grandin <noel@peralex.com> | 2016-02-23 13:06:38 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-02-24 11:48:38 +0200 |
commit | a9a04f11a6b3938aa2d8d0f8f21a866c65b761da (patch) | |
tree | 8784fd99b1a003649262ef5b5d1a192d3f517573 | |
parent | cd1bbdf0a494298882f79add7b5f28c3b56d9a14 (diff) |
convert ComponentMethodGuard::MethodType to scoped enum
Change-Id: I1f1b4981c70c2b8ff8087a85f0af28b816b4654a
-rw-r--r-- | comphelper/source/container/enumerablemap.cxx | 2 | ||||
-rw-r--r-- | include/comphelper/componentbase.hxx | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/comphelper/source/container/enumerablemap.cxx b/comphelper/source/container/enumerablemap.cxx index b04689f6f27f..0101b1a4423d 100644 --- a/comphelper/source/container/enumerablemap.cxx +++ b/comphelper/source/container/enumerablemap.cxx @@ -321,7 +321,7 @@ namespace comphelper void SAL_CALL EnumerableMap::initialize( const Sequence< Any >& _arguments ) throw (Exception, RuntimeException, std::exception) { - ComponentMethodGuard aGuard( *this, ComponentMethodGuard::WithoutInit ); + ComponentMethodGuard aGuard( *this, ComponentMethodGuard::MethodType::WithoutInit ); if ( impl_isInitialized_nothrow() ) throw AlreadyInitializedException(); diff --git a/include/comphelper/componentbase.hxx b/include/comphelper/componentbase.hxx index d5e3923eee14..b5cce3d17292 100644 --- a/include/comphelper/componentbase.hxx +++ b/include/comphelper/componentbase.hxx @@ -110,7 +110,7 @@ namespace comphelper class ComponentMethodGuard { public: - enum MethodType + enum class MethodType { /// allow the method to be called only when being initialized and not being disposed Default, @@ -119,10 +119,10 @@ namespace comphelper }; - ComponentMethodGuard( ComponentBase& _rComponent, const MethodType _eType = Default ) + ComponentMethodGuard( ComponentBase& _rComponent, const MethodType _eType = MethodType::Default ) :m_aMutexGuard( _rComponent.getMutex( ComponentBase::GuardAccess() ) ) { - if ( _eType != WithoutInit ) + if ( _eType != MethodType::WithoutInit ) _rComponent.checkInitialized( ComponentBase::GuardAccess() ); _rComponent.checkDisposed( ComponentBase::GuardAccess() ); } |