Fix formatting

This commit is contained in:
Eric Fischer 2015-10-20 12:03:49 -07:00
parent eb5c78482a
commit e554a121fb
3 changed files with 14 additions and 15 deletions

View File

@ -417,6 +417,5 @@ int main(int argc, char **argv) {
usage(argv); usage(argv);
} }
return 0; return 0;
} }

View File

@ -339,11 +339,11 @@ drawvec reduce_tiny_poly(drawvec &geom, int z, int detail, bool *reduced, double
if (*accum_area > pixel * pixel) { if (*accum_area > pixel * pixel) {
// XXX use centroid; // XXX use centroid;
out.push_back(draw(VT_MOVETO, 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));
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; *accum_area -= pixel * pixel;
} }

18
tile.cc
View File

@ -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; int threads = MAX_THREADS;
if (threads > TEMP_FILES / 4) { 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; threads = useful_threads;
} }
// Round down to a power of 2 // 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 // 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].metabase = metabase;
args[thread].stringpool = stringpool; args[thread].stringpool = stringpool;
args[thread].min_detail = min_detail; args[thread].min_detail = min_detail;
args[thread].basezoom = maxzoom; // XXX rename? args[thread].basezoom = maxzoom; // XXX rename?
args[thread].file_keys = file_keys; // locked with var_lock args[thread].file_keys = file_keys; // locked with var_lock
args[thread].layernames = layernames; 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].droprate = droprate;
args[thread].buffer = buffer; args[thread].buffer = buffer;
args[thread].fname = fname; 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_minzoom = minzoom;
args[thread].file_maxzoom = maxzoom; args[thread].file_maxzoom = maxzoom;
args[thread].todo = todo; 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].gamma = gamma;
args[thread].nlayers = nlayers; args[thread].nlayers = nlayers;
args[thread].prevent = prevent; 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].geomfd = geomfd;
args[thread].geom_size = geom_size; args[thread].geom_size = geom_size;
args[thread].midx = midx; // locked with var_lock args[thread].midx = midx; // locked with var_lock
args[thread].midy = midy; // locked with var_lock args[thread].midy = midy; // locked with var_lock
args[thread].maxzoom = maxzoom; args[thread].maxzoom = maxzoom;
args[thread].minzoom = minzoom; args[thread].minzoom = minzoom;
args[thread].full_detail = full_detail; args[thread].full_detail = full_detail;
args[thread].low_detail = low_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; args[thread].tasks = dispatches[thread].tasks;