Make the state attribute private

Also add a virtual setState() method to give subclasses a chance
to intercept the change of state. This will be used by VectorTileData
to release resources when the TileData becomes immutable.
This commit is contained in:
Thiago Marcos P. Santos
2015-05-12 22:14:22 +03:00
committed by Konstantin Käfer
parent 40b604448f
commit 41d619771e
9 changed files with 56 additions and 31 deletions

View File

@@ -46,7 +46,7 @@ std::shared_ptr<TileData> TileCache::get(uint64_t key) {
data = it->second;
tiles.erase(it);
orderedKeys.remove(key);
assert(data->ready());
assert(data->isReady());
}
return data;