From 6a03badcbc92ab650900abaa64dd7d47e330b101 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 17 Jul 2018 23:53:21 -0400 Subject: astc: Initialize vector size directly in Decompress There's no need to perform a separate resize. --- src/video_core/textures/astc.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/video_core/textures/astc.cpp b/src/video_core/textures/astc.cpp index 6dfcadc6a..b1feacae9 100644 --- a/src/video_core/textures/astc.cpp +++ b/src/video_core/textures/astc.cpp @@ -1600,8 +1600,7 @@ namespace Tegra::Texture::ASTC { std::vector Decompress(std::vector& data, uint32_t width, uint32_t height, uint32_t block_width, uint32_t block_height) { uint32_t blockIdx = 0; - std::vector outData; - outData.resize(height * width * 4); + std::vector outData(height * width * 4); for (uint32_t j = 0; j < height; j += block_height) { for (uint32_t i = 0; i < width; i += block_width) { -- cgit v1.2.3