mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-02-01 16:58:05 +00:00
Fix indentation
This commit is contained in:
parent
18e345efb0
commit
2b936af96a
9
main.cpp
9
main.cpp
@ -2518,7 +2518,8 @@ int main(int argc, char **argv) {
|
|||||||
src.layer = std::string(optarg).substr(0, cp - optarg);
|
src.layer = std::string(optarg).substr(0, cp - optarg);
|
||||||
src.file = std::string(cp + 1);
|
src.file = std::string(cp + 1);
|
||||||
sources.push_back(src);
|
sources.push_back(src);
|
||||||
} break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case 'z':
|
case 'z':
|
||||||
if (strcmp(optarg, "g") == 0) {
|
if (strcmp(optarg, "g") == 0) {
|
||||||
@ -2695,7 +2696,8 @@ int main(int argc, char **argv) {
|
|||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case 'a': {
|
case 'a': {
|
||||||
char *cp;
|
char *cp;
|
||||||
@ -2707,7 +2709,8 @@ int main(int argc, char **argv) {
|
|||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case 'v':
|
case 'v':
|
||||||
fprintf(stderr, VERSION);
|
fprintf(stderr, VERSION);
|
||||||
|
@ -896,7 +896,8 @@ int main(int argc, char **argv) {
|
|||||||
std::string before = std::string(optarg).substr(0, cp - optarg);
|
std::string before = std::string(optarg).substr(0, cp - optarg);
|
||||||
std::string after = std::string(cp + 1);
|
std::string after = std::string(cp + 1);
|
||||||
renames.insert(std::pair<std::string, std::string>(before, after));
|
renames.insert(std::pair<std::string, std::string>(before, after));
|
||||||
} break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case 'q':
|
case 'q':
|
||||||
quiet = true;
|
quiet = true;
|
||||||
|
15
tile.cpp
15
tile.cpp
@ -1501,30 +1501,27 @@ void preserve_attribute(attribute_op op, std::map<std::string, accum_state> &att
|
|||||||
p.full_values[i].type = mvt_double;
|
p.full_values[i].type = mvt_double;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case op_max:
|
case op_max: {
|
||||||
{
|
|
||||||
double existing = atof(p.full_values[i].s.c_str());
|
double existing = atof(p.full_values[i].s.c_str());
|
||||||
double maybe = atof(val.s.c_str());
|
double maybe = atof(val.s.c_str());
|
||||||
if (maybe > existing) {
|
if (maybe > existing) {
|
||||||
p.full_values[i].s = val.s.c_str();
|
p.full_values[i].s = val.s.c_str();
|
||||||
p.full_values[i].type = mvt_double;
|
p.full_values[i].type = mvt_double;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case op_min:
|
case op_min: {
|
||||||
{
|
|
||||||
double existing = atof(p.full_values[i].s.c_str());
|
double existing = atof(p.full_values[i].s.c_str());
|
||||||
double maybe = atof(val.s.c_str());
|
double maybe = atof(val.s.c_str());
|
||||||
if (maybe < existing) {
|
if (maybe < existing) {
|
||||||
p.full_values[i].s = val.s.c_str();
|
p.full_values[i].s = val.s.c_str();
|
||||||
p.full_values[i].type = mvt_double;
|
p.full_values[i].type = mvt_double;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case op_mean:
|
case op_mean: {
|
||||||
{
|
|
||||||
auto state = attribute_accum_state.find(key);
|
auto state = attribute_accum_state.find(key);
|
||||||
if (state == attribute_accum_state.end()) {
|
if (state == attribute_accum_state.end()) {
|
||||||
accum_state s;
|
accum_state s;
|
||||||
@ -1539,8 +1536,8 @@ void preserve_attribute(attribute_op op, std::map<std::string, accum_state> &att
|
|||||||
|
|
||||||
p.full_values[i].s = milo::dtoa_milo(state->second.sum / state->second.count);
|
p.full_values[i].s = milo::dtoa_milo(state->second.sum / state->second.count);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case op_concat:
|
case op_concat:
|
||||||
p.full_values[i].s += val.s;
|
p.full_values[i].s += val.s;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user