aboutsummaryrefslogtreecommitdiff
path: root/common/huffman.cpp
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2017-08-24 19:51:06 +0200
committerGitHub2017-08-24 19:51:06 +0200
commitbd10131242210262eb23c5a62c223039cabf905c (patch)
treefe2ad03ea734f45bf79baa790a64e25923fe0072 /common/huffman.cpp
parent265fc48d1590cdd503187c79dc254d65623c8d7b (diff)
parent4278cff7f014ba1f404b3cebfe20016b957fafbf (diff)
downloadscummvm-rg350-bd10131242210262eb23c5a62c223039cabf905c.tar.gz
scummvm-rg350-bd10131242210262eb23c5a62c223039cabf905c.tar.bz2
scummvm-rg350-bd10131242210262eb23c5a62c223039cabf905c.zip
Merge pull request #975 from wjp/bitstream
Rework and optimize Common::BitStream
Diffstat (limited to 'common/huffman.cpp')
-rw-r--r--common/huffman.cpp15
1 files changed, 0 insertions, 15 deletions
diff --git a/common/huffman.cpp b/common/huffman.cpp
index afb4fa00b6..3268ddf251 100644
--- a/common/huffman.cpp
+++ b/common/huffman.cpp
@@ -68,19 +68,4 @@ void Huffman::setSymbols(const uint32 *symbols) {
_symbols[i]->symbol = symbols ? *symbols++ : i;
}
-uint32 Huffman::getSymbol(BitStream &bits) const {
- uint32 code = 0;
-
- for (uint32 i = 0; i < _codes.size(); i++) {
- bits.addBit(code, i);
-
- for (CodeList::const_iterator cCode = _codes[i].begin(); cCode != _codes[i].end(); ++cCode)
- if (code == cCode->code)
- return cCode->symbol;
- }
-
- error("Unknown Huffman code");
- return 0;
-}
-
} // End of namespace Common