return ret;
}
- auto id_found = std::find(id_list.begin(), id_list.end(), ret);
- if( (ret > this->idEnd()) || (id_found != id_list.cend()) )
+ size_t count = std::count(id_list.begin(), id_list.end(), ret);
+ if( (ret > this->idEnd()) || (count > 1))
{
HMI_NOTICE("id %d is not available then generate new id", ret);
ret = 0; // reset