summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <thiago@mapbox.com>2015-05-11 15:43:55 +0300
committerThiago Marcos P. Santos <thiago@mapbox.com>2015-05-11 15:43:55 +0300
commitb7c63630a4720aaf5c32a04c52687cdfd9436d33 (patch)
treef1c3d7fe2932138ae1c3632c3295b58c32bd70c3
parent5ef362bbc45e7b553f5d21a5368e09dd243a8a0c (diff)
downloadqtlocation-mapboxgl-b7c63630a4720aaf5c32a04c52687cdfd9436d33.tar.gz
Initialize the atomic_flag in the class definition
ATOMIC_FLAG_INIT is often defined to { 0 } or { false } and some compilers might complain about initializing as flag(ATOMIC_FLAG_INIT).
-rw-r--r--src/mbgl/map/tile_data.cpp1
-rw-r--r--src/mbgl/map/tile_data.hpp2
2 files changed, 1 insertions, 2 deletions
diff --git a/src/mbgl/map/tile_data.cpp b/src/mbgl/map/tile_data.cpp
index c6d87c7bde..51ae37fd1c 100644
--- a/src/mbgl/map/tile_data.cpp
+++ b/src/mbgl/map/tile_data.cpp
@@ -13,7 +13,6 @@ TileData::TileData(const TileID& id_, const SourceInfo& source_)
: id(id_),
name(id),
state(State::initial),
- parsing(ATOMIC_FLAG_INIT),
source(source_),
env(Environment::Get()),
debugBucket(debugFontBuffer) {
diff --git a/src/mbgl/map/tile_data.hpp b/src/mbgl/map/tile_data.hpp
index ecc53a6b5e..57f7c30ff3 100644
--- a/src/mbgl/map/tile_data.hpp
+++ b/src/mbgl/map/tile_data.hpp
@@ -62,7 +62,7 @@ public:
const TileID id;
const std::string name;
std::atomic<State> state;
- std::atomic_flag parsing;
+ std::atomic_flag parsing = ATOMIC_FLAG_INIT;
protected:
// Set the internal parsing state to true so we prevent