simplify - remove before/afterParse and create Parser on stack in worker thread
This commit is contained in:
@@ -79,11 +79,8 @@ void TileData::cancel() {
|
||||
}
|
||||
}
|
||||
|
||||
void TileData::beforeParse() {}
|
||||
|
||||
void TileData::reparse() {
|
||||
beforeParse();
|
||||
|
||||
void TileData::reparse()
|
||||
{
|
||||
// We're creating a new work request. The work request deletes itself after it executed
|
||||
// the after work handler
|
||||
new uv::work<util::ptr<TileData>>(
|
||||
@@ -92,10 +89,7 @@ void TileData::reparse() {
|
||||
tile->parse();
|
||||
},
|
||||
[](util::ptr<TileData> &tile) {
|
||||
tile->afterParse();
|
||||
tile->map.update();
|
||||
},
|
||||
shared_from_this());
|
||||
}
|
||||
|
||||
void TileData::afterParse() {}
|
||||
|
||||
Reference in New Issue
Block a user