MCPcopy Create free account
hub / github.com/DFHack/dfhack / color_tree_cleanup

Function color_tree_cleanup

depends/lodepng/lodepng.cpp:3120–3128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3118}
3119
3120static void color_tree_cleanup(ColorTree* tree) {
3121 int i;
3122 for(i = 0; i != 16; ++i) {
3123 if(tree->children[i]) {
3124 color_tree_cleanup(tree->children[i]);
3125 lodepng_free(tree->children[i]);
3126 }
3127 }
3128}
3129
3130/*returns -1 if color not present, its index otherwise*/
3131static int color_tree_get(ColorTree* tree, unsigned char r, unsigned char g, unsigned char b, unsigned char a) {

Callers 2

lodepng_convertFunction · 0.85

Calls 1

lodepng_freeFunction · 0.85

Tested by

no test coverage detected