Check if next id is not bigger than UINT_MAX.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-03-19 16:54:27 +02:00
parent 4e45390b72
commit bd783d4df1

View File

@ -197,6 +197,13 @@ quint32 VContainer::getId()
*/ */
quint32 VContainer::getNextId() quint32 VContainer::getNextId()
{ {
//TODO. Current count of ids are very big and allow us save time before someone will reach its max value.
//Better way, of cource, is to seek free ids inside the set of values and reuse them.
//But for now better to keep it as it is now.
if (_id == UINT_MAX)
{
qCritical()<<(tr("Number of free id exhausted."));
}
_id++; _id++;
return _id; return _id;
} }