diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-09-12 12:48:21 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-09-12 13:09:05 +0100 |
commit | 1c4f72748d43dfbabd26b3c99a76f547eb050da0 (patch) | |
tree | 95b0ebf994943c6e8675f202729eedffdd15a32e /dbaccess/source | |
parent | CID#736166 unlikely out of bounds (diff) | |
download | core-1c4f72748d43dfbabd26b3c99a76f547eb050da0.tar.gz core-1c4f72748d43dfbabd26b3c99a76f547eb050da0.zip |
CID#736168 help coverity out a bit
coverity thinks theres an overrun here, I think its wrong, but its
needlessly complicated code, simplify
Change-Id: I9db4886b4e60d49c25de514081953cb380d4146f
Diffstat (limited to 'dbaccess/source')
-rw-r--r-- | dbaccess/source/ui/app/AppDetailPageHelper.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx index 148d469d68ca..cd36d9869689 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx @@ -346,12 +346,11 @@ void OAppDetailPageHelper::getSelectionElementNames( ::std::vector< OUString>& _ void OAppDetailPageHelper::describeCurrentSelectionForControl( const Control& _rControl, Sequence< NamedDatabaseObject >& _out_rSelectedObjects ) { - enum ElementType eType = E_TABLE; - for ( size_t i=0; i < E_ELEMENT_TYPE_COUNT; eType = static_cast< ElementType >( ++i ) ) + for (size_t i=0; i < E_ELEMENT_TYPE_COUNT; ++i) { - if ( m_pLists[eType] == &_rControl ) + if ( m_pLists[i] == &_rControl ) { - describeCurrentSelectionForType( eType, _out_rSelectedObjects ); + describeCurrentSelectionForType(static_cast<ElementType>(i), _out_rSelectedObjects); return; } } |