From aca1914d674a5e81234208248e3c8515a60dd19d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 4 Oct 2012 12:30:12 +1000 Subject: code cleanup: make more functions static, add includes. (bzr r11737) --- src/trace/quantize.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/trace/quantize.cpp') diff --git a/src/trace/quantize.cpp b/src/trace/quantize.cpp index 2db1bbf34..ba9306da8 100644 --- a/src/trace/quantize.cpp +++ b/src/trace/quantize.cpp @@ -16,6 +16,7 @@ #include "pool.h" #include "imagemap.h" +#include "quantize.h" typedef struct Ocnode_def Ocnode; @@ -211,16 +212,19 @@ static void ocnodePrint(Ocnode *node, int indent) ocnodePrint(node->child[i], indent+2); } } + +#if 0 void octreePrint(Ocnode *node) { printf("<>\n"); if (node) printf("[r:%p] ", node); ocnodePrint(node, 2); } +#endif /** * builds a single color leaf at location */ -void ocnodeLeaf(pool *pool, Ocnode **ref, RGB rgb) +static void ocnodeLeaf(pool *pool, Ocnode **ref, RGB rgb) { assert(ref); Ocnode *node = ocnodeNew(pool); @@ -237,7 +241,7 @@ void ocnodeLeaf(pool *pool, Ocnode **ref, RGB rgb) /** * merge nodes and at location with parent */ -int octreeMerge(pool *pool, Ocnode *parent, Ocnode **ref, Ocnode *node1, Ocnode *node2) +static int octreeMerge(pool *pool, Ocnode *parent, Ocnode **ref, Ocnode *node1, Ocnode *node2) { assert(ref); if (!node1 && !node2) return 0; @@ -415,7 +419,7 @@ static void ocnodeStrip(pool *pool, Ocnode **ref, int *count, unsigned l /** * reduce the leaves of an octree to a given number */ -void octreePrune(pool *pool, Ocnode **ref, int ncolor) +static void octreePrune(pool *pool, Ocnode **ref, int ncolor) { assert(ref); assert(ncolor > 0); @@ -435,8 +439,8 @@ void octreePrune(pool *pool, Ocnode **ref, int ncolor) * build an octree associated to the area of a color map , * included in the specified (x1,y1)--(x2,y2) rectangle. */ -void octreeBuildArea(pool *pool, RgbMap *rgbmap, Ocnode **ref, - int x1, int y1, int x2, int y2, int ncolor) +static void octreeBuildArea(pool *pool, RgbMap *rgbmap, Ocnode **ref, + int x1, int y1, int x2, int y2, int ncolor) { int dx = x2 - x1, dy = y2 - y1; int xm = x1 + dx/2, ym = y1 + dy/2; @@ -465,7 +469,7 @@ void octreeBuildArea(pool *pool, RgbMap *rgbmap, Ocnode **ref, * build an octree associated to the color map, * pruned to colors. */ -Ocnode *octreeBuild(pool *pool, RgbMap *rgbmap, int ncolor) +static Ocnode *octreeBuild(pool *pool, RgbMap *rgbmap, int ncolor) { //create the octree Ocnode *node = NULL; -- cgit v1.2.3