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
This commit is contained in:
Caolán McNamara
2013-09-12 12:48:21 +01:00
parent dbff5bd4cd
commit 1c4f72748d

View File

@@ -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;
}
}