From e554a121fbac534c86a837c07cd0216641239515 Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Tue, 20 Oct 2015 12:03:49 -0700 Subject: [PATCH] Fix formatting --- decode.cc | 1 - geometry.cc | 10 +++++----- tile.cc | 18 +++++++++--------- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/decode.cc b/decode.cc index fb97780..e6062ab 100644 --- a/decode.cc +++ b/decode.cc @@ -417,6 +417,5 @@ int main(int argc, char **argv) { usage(argv); } - return 0; } diff --git a/geometry.cc b/geometry.cc index 508b308..482142d 100644 --- a/geometry.cc +++ b/geometry.cc @@ -339,11 +339,11 @@ drawvec reduce_tiny_poly(drawvec &geom, int z, int detail, bool *reduced, double if (*accum_area > pixel * pixel) { // XXX use centroid; - out.push_back(draw(VT_MOVETO, geom[i].x - pixel/2, geom[i].y - pixel/2)); - out.push_back(draw(VT_LINETO, geom[i].x + pixel/2, geom[i].y - pixel/2)); - out.push_back(draw(VT_LINETO, geom[i].x + pixel/2, geom[i].y + pixel/2)); - out.push_back(draw(VT_LINETO, geom[i].x - pixel/2, geom[i].y + pixel/2)); - out.push_back(draw(VT_LINETO, geom[i].x - pixel/2, geom[i].y - pixel/2)); + out.push_back(draw(VT_MOVETO, geom[i].x - pixel / 2, geom[i].y - pixel / 2)); + out.push_back(draw(VT_LINETO, geom[i].x + pixel / 2, geom[i].y - pixel / 2)); + out.push_back(draw(VT_LINETO, geom[i].x + pixel / 2, geom[i].y + pixel / 2)); + out.push_back(draw(VT_LINETO, geom[i].x - pixel / 2, geom[i].y + pixel / 2)); + out.push_back(draw(VT_LINETO, geom[i].x - pixel / 2, geom[i].y - pixel / 2)); *accum_area -= pixel * pixel; } diff --git a/tile.cc b/tile.cc index 8a8cd83..5e4cb44 100644 --- a/tile.cc +++ b/tile.cc @@ -956,7 +956,7 @@ int traverse_zooms(int *geomfd, off_t *geom_size, char *metabase, char *stringpo } } -#define MAX_THREADS 20 // XXX Obtain from sysctl(hw.ncpu), /proc/cpuinfo, etc. +#define MAX_THREADS 20 // XXX Obtain from sysctl(hw.ncpu), /proc/cpuinfo, etc. int threads = MAX_THREADS; if (threads > TEMP_FILES / 4) { @@ -969,7 +969,7 @@ int traverse_zooms(int *geomfd, off_t *geom_size, char *metabase, char *stringpo threads = useful_threads; } // Round down to a power of 2 - threads = 1 << (int)(log(threads) / log(2)); + threads = 1 << (int) (log(threads) / log(2)); // Assign temporary files to threads @@ -1021,10 +1021,10 @@ int traverse_zooms(int *geomfd, off_t *geom_size, char *metabase, char *stringpo args[thread].metabase = metabase; args[thread].stringpool = stringpool; args[thread].min_detail = min_detail; - args[thread].basezoom = maxzoom; // XXX rename? - args[thread].file_keys = file_keys; // locked with var_lock + args[thread].basezoom = maxzoom; // XXX rename? + args[thread].file_keys = file_keys; // locked with var_lock args[thread].layernames = layernames; - args[thread].outdb = outdb; // locked with db_lock + args[thread].outdb = outdb; // locked with db_lock args[thread].droprate = droprate; args[thread].buffer = buffer; args[thread].fname = fname; @@ -1032,7 +1032,7 @@ int traverse_zooms(int *geomfd, off_t *geom_size, char *metabase, char *stringpo args[thread].file_minzoom = minzoom; args[thread].file_maxzoom = maxzoom; args[thread].todo = todo; - args[thread].along = &along; // locked with var_lock + args[thread].along = &along; // locked with var_lock args[thread].gamma = gamma; args[thread].nlayers = nlayers; args[thread].prevent = prevent; @@ -1041,13 +1041,13 @@ int traverse_zooms(int *geomfd, off_t *geom_size, char *metabase, char *stringpo args[thread].geomfd = geomfd; args[thread].geom_size = geom_size; - args[thread].midx = midx; // locked with var_lock - args[thread].midy = midy; // locked with var_lock + args[thread].midx = midx; // locked with var_lock + args[thread].midy = midy; // locked with var_lock args[thread].maxzoom = maxzoom; args[thread].minzoom = minzoom; args[thread].full_detail = full_detail; args[thread].low_detail = low_detail; - args[thread].most = &most; // locked with var_lock + args[thread].most = &most; // locked with var_lock args[thread].tasks = dispatches[thread].tasks;