Recast: use DT_MIN_POLY_GROUP_COUNT for dtCalcTraverseTableSize

Use the actual constant instead.
This commit is contained in:
Kawe Mazidjatari 2024-10-16 17:06:18 +02:00
parent 5460427cda
commit 9b44b098f8

View File

@ -191,9 +191,8 @@ int dtCalcTraverseTableCellIndex(const int numPolyGroups,
int dtCalcTraverseTableSize(const int numPolyGroups)
{
// If we only have 2 poly groups, we don't need a traverse table as group
// 1 is for unlinked polygons and group 2 for linked polygons.
if (numPolyGroups <= 2)
// If we only have 2 poly groups, we don't need a traverse table.
if (numPolyGroups < DT_MIN_POLY_GROUP_COUNT)
return 0;
return sizeof(int)*(numPolyGroups*((numPolyGroups+(RD_BITS_PER_BIT_CELL-1))/RD_BITS_PER_BIT_CELL));