Check if next id is not bigger than UINT_MAX.
--HG-- branch : develop
This commit is contained in:
parent
4e45390b72
commit
bd783d4df1
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user