diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-12-03 21:03:37 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-12-04 08:49:55 +0100 |
commit | b7597b45255aa6514825b987d6fa23e2c92f92df (patch) | |
tree | 9248ac84387d179bb1c7546c2108375b5ea62653 | |
parent | 3cde4fc90833fdba86ff3817b044cc60e5508333 (diff) |
use scoped enum
Change-Id: I8eadedbdf5f4bee218ae2f39c76300fc0624912b
Reviewed-on: https://gerrit.libreoffice.org/84374
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r-- | stoc/source/invocation/invocation.cxx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx index d70ed15cc2b8..c1c97f6d05aa 100644 --- a/stoc/source/invocation/invocation.cxx +++ b/stoc/source/invocation/invocation.cxx @@ -704,10 +704,11 @@ struct MemberItem OUString aName; // Defines where the member comes from - enum Mode { NAMEACCESS, PROPERTYSET, METHOD } eMode; + enum class Mode { NameAccess, PropertySet, Method }; + Mode eMode; // Index to respective sequence - // (Index to NameAccess sequence for eMode==NAMEACCESS etc.) + // (Index to NameAccess sequence for eMode==Mode::NameAccess etc.) sal_Int32 nIndex; }; @@ -765,7 +766,7 @@ void Invocation_Impl::getInfoSequenceImpl { MemberItem& rItem = pItems[ iTotal ]; rItem.aName = pStrings[ i ]; - rItem.eMode = MemberItem::NAMEACCESS; + rItem.eMode = MemberItem::Mode::NameAccess; rItem.nIndex = i; } @@ -774,7 +775,7 @@ void Invocation_Impl::getInfoSequenceImpl { MemberItem& rItem = pItems[ iTotal ]; rItem.aName = pProps[ i ].Name; - rItem.eMode = MemberItem::PROPERTYSET; + rItem.eMode = MemberItem::Mode::PropertySet; rItem.nIndex = i; } @@ -784,7 +785,7 @@ void Invocation_Impl::getInfoSequenceImpl MemberItem& rItem = pItems[ iTotal ]; Reference< XIdlMethod > xMethod = pMethods[ i ]; rItem.aName = xMethod->getName(); - rItem.eMode = MemberItem::METHOD; + rItem.eMode = MemberItem::Mode::Method; rItem.nIndex = i; } @@ -814,15 +815,15 @@ void Invocation_Impl::getInfoSequenceImpl if( pRetInfos ) { - if( rItem.eMode == MemberItem::NAMEACCESS ) + if( rItem.eMode == MemberItem::Mode::NameAccess ) { fillInfoForNameAccess( pRetInfos[ iTotal ], rItem.aName ); } - else if( rItem.eMode == MemberItem::PROPERTYSET ) + else if( rItem.eMode == MemberItem::Mode::PropertySet ) { fillInfoForProperty( pRetInfos[ iTotal ], pProps[ rItem.nIndex ] ); } - else if( rItem.eMode == MemberItem::METHOD ) + else if( rItem.eMode == MemberItem::Mode::Method ) { fillInfoForMethod( pRetInfos[ iTotal ], pMethods[ rItem.nIndex ] ); } |