All the other places where I used volatile but really wanted atomic

This commit is contained in:
Eric Fischer
2018-03-13 15:21:21 -07:00
parent f1eede1106
commit fac0ebbf52
6 changed files with 37 additions and 31 deletions
+1 -1
View File
@@ -432,7 +432,7 @@ int serialize_feature(struct serialization_state *sst, serial_feature &sf) {
inline_meta = false;
if (prevent[P_CLIPPING]) {
static volatile long long warned = 0;
static std::atomic<long long> warned(0);
long long extent = ((sf.bbox[2] - sf.bbox[0]) / ((1LL << (32 - sst->maxzoom)) + 1)) * ((sf.bbox[3] - sf.bbox[1]) / ((1LL << (32 - sst->maxzoom)) + 1));
if (extent > warned) {
fprintf(stderr, "Warning: %s:%d: Large unclipped (-pc) feature may be duplicated across %lld tiles\n", sst->fname, sst->line, extent);