From 754dbf152a8b179f0012d5344fa64794afb0908c Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Fri, 24 Oct 2014 15:21:20 -0700 Subject: [PATCH] Remove dead code --- geojson.c | 22 ---------------------- geometry.cc | 2 ++ 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/geojson.c b/geojson.c index 827e7b07..0424f99f 100644 --- a/geojson.c +++ b/geojson.c @@ -122,28 +122,6 @@ void decode(unsigned long long index, unsigned *wx, unsigned *wy) { } } -// http://www.tbray.org/ongoing/When/200x/2003/03/22/Binary -void *search(const void *key, const void *base, size_t nel, size_t width, - int (*cmp)(const void *, const void *)) { - - long long high = nel, low = -1, probe; - while (high - low > 1) { - probe = (low + high) >> 1; - int c = cmp(((char *) base) + probe * width, key); - if (c > 0) { - high = probe; - } else { - low = probe; - } - } - - if (low < 0) { - low = 0; - } - - return ((char *) base) + low * width; -} - int indexcmp(const void *v1, const void *v2) { const struct index *i1 = v1; const struct index *i2 = v2; diff --git a/geometry.cc b/geometry.cc index 50f858b6..6e3818c8 100644 --- a/geometry.cc +++ b/geometry.cc @@ -124,6 +124,7 @@ drawvec remove_noop(drawvec geom, int type) { } /* XXX */ +#if 0 drawvec shrink_lines(drawvec &geom, int z, int detail, int basezoom, long long *here, double droprate) { long long res = 200LL << (32 - 8 - z); long long portion = res / exp(log(sqrt(droprate)) * (basezoom - z)); @@ -175,6 +176,7 @@ drawvec shrink_lines(drawvec &geom, int z, int detail, int basezoom, long long * return out; } +#endif static bool inside(draw d, int edge, long long area) { long long clip_buffer = area / 64;