Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/7zip/Compress/QuantumDecoder.cpp')
-rw-r--r--CPP/7zip/Compress/QuantumDecoder.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/CPP/7zip/Compress/QuantumDecoder.cpp b/CPP/7zip/Compress/QuantumDecoder.cpp
index 64e35bf2..8c650581 100644
--- a/CPP/7zip/Compress/QuantumDecoder.cpp
+++ b/CPP/7zip/Compress/QuantumDecoder.cpp
@@ -41,7 +41,7 @@ unsigned CModelDecoder::Decode(CRangeDecoder *rc)
unsigned res = Vals[--i];
do
- Freqs[i] += kUpdateStep;
+ Freqs[i] = (UInt16)(Freqs[i] + kUpdateStep);
while (i--);
if (Freqs[0] > kFreqSumMax)
@@ -72,7 +72,7 @@ unsigned CModelDecoder::Decode(CRangeDecoder *rc)
i = NumItems - 1;
do
{
- Freqs[i] >>= 1;
+ Freqs[i] = (UInt16)(Freqs[i] >> 1);
if (Freqs[i] <= Freqs[(size_t)i + 1])
Freqs[i] = (UInt16)(Freqs[(size_t)i + 1] + 1);
}