mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-06 18:35:41 +02:00
Fix the option for testing radix sort
Add a check to make sure I don't make the same mistake again
This commit is contained in:
@@ -2483,6 +2483,28 @@ int main(int argc, char **argv) {
|
|||||||
additional[i] = 0;
|
additional[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
char dup[256];
|
||||||
|
|
||||||
|
memset(dup, 0, sizeof(dup));
|
||||||
|
for (i = 0; i < sizeof(additional_options) / sizeof(additional_options[0]); i++) {
|
||||||
|
if (dup[additional_options[i]]) {
|
||||||
|
fprintf(stderr, "Internal error: reused -a%c\n", additional_options[i]);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
dup[additional_options[i]] = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
memset(dup, 0, sizeof(dup));
|
||||||
|
for (i = 0; i < sizeof(prevent_options) / sizeof(prevent_options[0]); i++) {
|
||||||
|
if (dup[prevent_options[i]]) {
|
||||||
|
fprintf(stderr, "Internal error: reused -p%c\n", prevent_options[i]);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
dup[prevent_options[i]] = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static struct option long_options[] = {
|
static struct option long_options[] = {
|
||||||
{"name", required_argument, 0, 'n'},
|
{"name", required_argument, 0, 'n'},
|
||||||
{"layer", required_argument, 0, 'l'},
|
{"layer", required_argument, 0, 'l'},
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ static int additional_options[] = {
|
|||||||
A_LINE_DROP,
|
A_LINE_DROP,
|
||||||
#define A_POLYGON_DROP ((int) 'p')
|
#define A_POLYGON_DROP ((int) 'p')
|
||||||
A_POLYGON_DROP,
|
A_POLYGON_DROP,
|
||||||
#define A_PREFER_RADIX_SORT ((int) 'r')
|
#define A_PREFER_RADIX_SORT ((int) 'R')
|
||||||
A_PREFER_RADIX_SORT,
|
A_PREFER_RADIX_SORT,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user