CComponentsForm: return id only if parameter is not 0

Origin commit data
------------------
Branch: ni/coolstream
Commit: 2af1c5d8b2
Author: Thilo Graf <dbt@novatux.de>
Date: 2013-06-12 (Wed, 12 Jun 2013)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
2013-06-12 22:22:50 +02:00
parent eb87a08e5e
commit ef95e68086

View File

@@ -154,9 +154,11 @@ void CComponentsForm::addCCItem(CComponentsItem* cc_Item)
int CComponentsForm::getCCItemId(CComponentsItem* cc_Item) int CComponentsForm::getCCItemId(CComponentsItem* cc_Item)
{ {
for (size_t i= 0; i< v_cc_items.size(); i++) if (cc_Item){
if (v_cc_items[i] == cc_Item) for (size_t i= 0; i< v_cc_items.size(); i++)
return i; if (v_cc_items[i] == cc_Item)
return i;
}
return -1; return -1;
} }