convert ComponentMethodGuard::MethodType to scoped enum
Change-Id: I1f1b4981c70c2b8ff8087a85f0af28b816b4654a
This commit is contained in:
parent
cd1bbdf0a4
commit
a9a04f11a6
@ -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();
|
||||
|
||||
|
@ -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() );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user