Use a proper constructor, discover two unused fields

This commit is contained in:
Eric Fischer
2017-11-10 13:06:47 -08:00
parent dca1ebbbfb
commit 069807caf4
2 changed files with 15 additions and 12 deletions
+7 -6
View File
@@ -374,7 +374,6 @@ void do_read_parallel(char *map, long long len, long long initial_offset, const
}
std::vector<parse_json_args> pja;
pja.resize(CPUS);
std::vector<serialization_state> sst;
sst.resize(CPUS);
@@ -410,12 +409,14 @@ void do_read_parallel(char *map, long long len, long long initial_offset, const
sst[i].basezoom = basezoom;
sst[i].attribute_types = attribute_types;
pja[i].jp = json_begin_map(map + segs[i], segs[i + 1] - segs[i]);
pja[i].layer = source;
pja[i].layername = &layername;
pja[i].sst = &sst[i];
pja.push_back(parse_json_args(
json_begin_map(map + segs[i], segs[i + 1] - segs[i]),
source,
&layername,
&sst[i]));
}
for (size_t i = 0; i < CPUS; i++) {
if (pthread_create(&pthreads[i], NULL, run_parse_json, &pja[i]) != 0) {
perror("pthread_create");
exit(EXIT_FAILURE);