Pull the writing of the serialized feature out to the callers

This commit is contained in:
Erica Fischer
2023-01-25 14:41:22 -08:00
parent 5806be8a5b
commit 12e3af018b
3 changed files with 10 additions and 7 deletions
+3 -1
View File
@@ -422,7 +422,9 @@ void rewrite(drawvec &geom, int z, int nextzoom, int maxzoom, long long *bbox, u
sf.values.push_back(metavals[i]);
}
serialize_feature(geomfile[j], &sf, &geompos[j], fname, SHIFT_RIGHT(initial_x[segment]), SHIFT_RIGHT(initial_y[segment]));
std::string feature = serialize_feature(&sf, SHIFT_RIGHT(initial_x[segment]), SHIFT_RIGHT(initial_y[segment]));
serialize_long_long(geomfile[j], feature.size(), &geompos[j], fname);
fwrite_check(feature.c_str(), sizeof(char), feature.size(), geomfile[j], &geompos[j], fname);
}
}
}