stoc/source/invocation/invocation.cxx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
New commits: commit b7597b45255aa6514825b987d6fa23e2c92f92df Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Tue Dec 3 21:03:37 2019 +0100 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Wed Dec 4 08:49:55 2019 +0100 use scoped enum Change-Id: I8eadedbdf5f4bee218ae2f39c76300fc0624912b Reviewed-on: https://gerrit.libreoffice.org/84374 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> 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 ] ); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits