huffman: quiet int64 -> int conversion warning

children_ is bounded by max_nodes_ and protected with IsFull checks

Change-Id: Iac1eb03c5030568140352174c1265a938fc28d97
This commit is contained in:
James Zern 2012-04-24 16:17:36 -07:00
parent 1349edade1
commit d96e722b0c

View File

@ -35,7 +35,8 @@ static int IsFull(const HuffmanTree* const tree) {
static void AssignChildren(HuffmanTree* const tree,
HuffmanTreeNode* const node) {
HuffmanTreeNode* const children = tree->root_ + tree->num_nodes_;
node->children_ = children - node;
node->children_ = (int)(children - node);
assert(children - node == (int)(children - node));
tree->num_nodes_ += 2;
TreeNodeInit(children + 0);
TreeNodeInit(children + 1);