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).
This commit is contained in:
Thiago Marcos P. Santos
2015-05-11 15:43:55 +03:00
parent 5ef362bbc4
commit b7c63630a4
2 changed files with 1 additions and 2 deletions

View File

@@ -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) {

View File

@@ -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