CComponentsForm: fix init value of getPageCount()

value is always 1


Origin commit data
------------------
Branch: ni/coolstream
Commit: 52f7c79db8
Author: Thilo Graf <dbt@novatux.de>
Date: 2014-11-07 (Fri, 07 Nov 2014)



------------------
This commit was generated by Migit
This commit is contained in:
2014-11-07 23:37:51 +01:00
parent 8aa206ce00
commit f7df5da3aa

View File

@@ -549,14 +549,14 @@ void CComponentsForm::setPageCount(const u_int8_t& pageCount)
u_int8_t CComponentsForm::getPageCount()
{
u_int8_t num = 0;
u_int8_t num = 1;
for(size_t i=0; i<v_cc_items.size(); i++){
u_int8_t item_num = v_cc_items[i]->getPageNumber();
num = max(item_num, num);
}
//convert type, possible -Wconversion warnings!
page_count = static_cast<u_int8_t>(num + 1);
page_count = static_cast<u_int8_t>(num);
return page_count;
}