summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-09-12 12:48:21 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-09-12 13:09:05 +0100
commit1c4f72748d43dfbabd26b3c99a76f547eb050da0 (patch)
tree95b0ebf994943c6e8675f202729eedffdd15a32e /dbaccess
parentdbff5bd4cd4eec4db844244d5ff431a3f2b1b82e (diff)
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')
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.cxx7
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;
}
}