1
1
forked from 0ad/0ad
This was SVN commit r16547.
This commit is contained in:
Nicolas Auvray 2015-04-16 13:17:58 +00:00
parent 2042e6b2d4
commit a0cf780e1e

View File

@ -429,7 +429,9 @@ public:
void Reset(fixed w, fixed h)
{
Reset(std::max(Index(w), Index(h)) + 1);
ENSURE(w >= fixed::Zero() && h >= fixed::Zero());
size_t arrayWidth = std::max((w / SUBDIVISION_SIZE).ToInt_RoundToZero(), (h / SUBDIVISION_SIZE).ToInt_RoundToZero()) + 1;
Reset(arrayWidth);
}
FastSpatialSubdivision& operator=(const FastSpatialSubdivision& other)