[core] Make response data shared to avoid excessive copying

This commit is contained in:
Konstantin Käfer
2015-10-16 16:14:55 +02:00
parent 4e3503ea6c
commit 5173bf1bb8
33 changed files with 135 additions and 117 deletions

View File

@@ -113,7 +113,7 @@ void MapContext::setStyleURL(const std::string& url) {
styleRequest = nullptr;
if (res.status == Response::Successful) {
loadStyleJSON(res.data, base);
loadStyleJSON(*res.data, base);
} else if (res.status == Response::NotFound && styleURL.find("mapbox://") == 0) {
Log::Error(Event::Setup, "style %s could not be found or is an incompatible legacy map or style", styleURL.c_str());
} else {