From 00996e7c3597c087f09fe42f57097ca3645af15b Mon Sep 17 00:00:00 2001 From: Artyom Polkovnikov Date: Tue, 18 Nov 2014 15:34:53 +0300 Subject: [PATCH] [coding] [arithmetic_codec] Simplify vector u32 from u64 initialization. --- coding/arithmetic_codec.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/coding/arithmetic_codec.cpp b/coding/arithmetic_codec.cpp index 1054f1450b..d179540b9e 100644 --- a/coding/arithmetic_codec.cpp +++ b/coding/arithmetic_codec.cpp @@ -38,12 +38,7 @@ vector FreqsToDistrTable(vector const & origFreqs) break; } } - if (!hasDegradedZeroInterval) { - // Convert distr_table to 32-bit vector, although currently only 17 bits are used. - vector distr_table; - for (uint32_t i = 0; i < result.size(); ++i) distr_table.push_back(result[i]); - return distr_table; - } + if (!hasDegradedZeroInterval) return vector(result.begin(), result.end()); ++freqLowerBound; } }