From 1c4f72748d43dfbabd26b3c99a76f547eb050da0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 12 Sep 2013 12:48:21 +0100 Subject: [PATCH] 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 --- dbaccess/source/ui/app/AppDetailPageHelper.cxx | 7 +++---- 1 file 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(i), _out_rSelectedObjects); return; } }