Differences From Artifact [784bf1ffb2]:
- File src/huffman_tree.m — part of check-in [c7f0229795] at 2020-01-02 01:51:34 on branch trunk — Update copyright (user: js, size: 3076) [annotate] [blame] [check-ins using] [more...]
To Artifact [f65a681bbc]:
- File
src/huffman_tree.m
— part of check-in
[3d8286feee]
at
2020-11-04 23:18:25
on branch trunk
— Remove of_free()
While it makes sense to wrap malloc and calloc to replace the error
checking with exceptions, it does not make sense to wrap free. (user: js, size: 2762) [annotate] [blame] [check-ins using] [more...]
︙ | |||
26 27 28 29 30 31 32 | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | - + - - - | #import "OFOutOfMemoryException.h" static struct of_huffman_tree * newTree(void) { struct of_huffman_tree *tree; |
︙ | |||
68 69 70 71 72 73 74 | 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | - - - - - - - - - - + + + - - - + - | uint_fast8_t maxBit = 0; @try { for (uint16_t i = 0; i < count; i++) { uint_fast8_t length = lengths[i]; if OF_UNLIKELY (length > maxBit) { |
︙ |