Small bug: don't allocate more memory than we have to.

This commit is contained in:
Pavel Krajcevski 2013-09-25 20:07:44 -04:00
parent ba36ca34fd
commit a57c40005c

View file

@ -304,10 +304,10 @@ namespace PVRTCC {
// First, extract all of the block information...
std::vector<Block> blocks;
blocks.reserve(w * h);
const uint32 blocksW = bTwoBitMode? (w / 8) : (w / 4);
const uint32 blocksH = h / 4;
blocks.reserve(blocksW * blocksH);
for(uint32 j = 0; j < blocksH; j++) {
for(uint32 i = 0; i < blocksW; i++) {