| 2927 | } |
| 2928 | |
| 2929 | static void color_tree_cleanup(ColorTree* tree) |
| 2930 | { |
| 2931 | int i; |
| 2932 | for(i = 0; i < 16; i++) |
| 2933 | { |
| 2934 | if(tree->children[i]) |
| 2935 | { |
| 2936 | color_tree_cleanup(tree->children[i]); |
| 2937 | lodepng_free(tree->children[i]); |
| 2938 | } |
| 2939 | } |
| 2940 | } |
| 2941 | |
| 2942 | /*returns -1 if color not present, its index otherwise*/ |
| 2943 | static int color_tree_get(ColorTree* tree, unsigned char r, unsigned char g, unsigned char b, unsigned char a) |
no test coverage detected