Fix Microsoft VisualStudio build of brotli

- Move all variable declarations to the beginning of the block
- #ifdef-out read/write calls
This commit is contained in:
Zoltan Szabadka
2013-12-13 10:39:46 +01:00
parent 2e5995bd96
commit 19320557a9
4 changed files with 36 additions and 18 deletions
+2 -1
View File
@@ -154,8 +154,9 @@ static int TreeAddSymbol(HuffmanTree* const tree,
int i = 1 << (HUFF_LUT_BITS - code_length);
base_code = ReverseBitsShort(code, code_length);
do {
int idx;
--i;
const int idx = base_code | (i << code_length);
idx = base_code | (i << code_length);
tree->lut_symbol_[idx] = (int16_t)symbol;
tree->lut_bits_[idx] = code_length;
} while (i > 0);