colors

extract colors from pictures
git clone git://git.2f30.org/colors.git
Log | Files | Refs | README | LICENSE

commit a562c0a7d0856d9f35814ad6c3863b05814d7fb8
parent 28fac3af0d18f48b48d9a938f9c54be5dd300584
Author: sin <sin@2f30.org>
Date:   Sat, 13 Jun 2015 11:27:51 +0100

Rename hasmember() to ismember()

is* is reserved namespace but wth.

Diffstat:
colors.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/colors.c b/colors.c @@ -200,7 +200,7 @@ delmember(struct cluster *c, struct point *p) } int -hasmember(struct cluster *c, struct point *p) +ismember(struct cluster *c, struct point *p) { return p->c == c; } @@ -232,13 +232,13 @@ process(void) } } - if (hasmember(&clusters[mini], p)) + if (ismember(&clusters[mini], p)) continue; /* not done yet, move point to nearest cluster */ done = 0; for (i = 0; i < nclusters; i++) { - if (hasmember(&clusters[i], p)) { + if (ismember(&clusters[i], p)) { delmember(&clusters[i], p); break; }