From 088481afe434b3b682bd8f376a489765758997af Mon Sep 17 00:00:00 2001 From: Pavel Krajcevski Date: Wed, 25 Sep 2013 16:37:17 -0400 Subject: [PATCH] Meant resize instead of reserve. --- PVRTCEncoder/src/Compressor.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/PVRTCEncoder/src/Compressor.cpp b/PVRTCEncoder/src/Compressor.cpp index 937c239..fd7298e 100644 --- a/PVRTCEncoder/src/Compressor.cpp +++ b/PVRTCEncoder/src/Compressor.cpp @@ -168,7 +168,7 @@ namespace PVRTCC { // Compute difference... ::std::vector difference; - difference.reserve(dcj.height * dcj.width * 4); + difference.resize(dcj.height * dcj.width * 4); for(uint32 j = 0; j < dcj.height; j++) { for(uint32 i = 0; i < dcj.width; i++) { for(uint32 c = 0; c < 4; c++) { @@ -186,8 +186,8 @@ namespace PVRTCC { ::std::vector minDiff; const uint32 kNumBlockChannels = dcj.height * dcj.width / 4; - maxDiff.reserve(kNumBlockChannels); - minDiff.reserve(kNumBlockChannels); + maxDiff.resize(kNumBlockChannels); + minDiff.resize(kNumBlockChannels); for(uint32 j = 2; j < dcj.height; j += 4) { for(uint32 i = 2; i < dcj.width; i += 4) { @@ -256,8 +256,8 @@ namespace PVRTCC { upB.DebugOutput("UpscaledB"); // Choose the most appropriate modulation values for the two images... - std::vector modValues; - modValues.reserve(dcj.width * dcj.height); + ::std::vector modValues; + modValues.resize(dcj.width * dcj.height); for(uint32 j = 0; j < dcj.height; j++) { for(uint32 i = 0; i < dcj.width; i++) { uint8 &mv = modValues[j * dcj.width + i];