Small optimization: reserve vector data before we populate blocks vector.

This commit is contained in:
Pavel Krajcevski 2013-09-25 16:38:10 -04:00
parent 33a1dab0a9
commit 2c8254d6c3

View file

@ -296,7 +296,9 @@ namespace PVRTCC {
// Pack everything into a PVRTC blocks.
const uint32 blocksW = dcj.width / 4;
const uint32 blocksH = dcj.height / 4;
std::vector<uint64> blocks;
blocks.reserve(blocksW * blocksH);
for(uint32 j = 0; j < blocksH; j++) {
for(uint32 i = 0; i < blocksW; i++) {
Block b;