[core] Make response data shared to avoid excessive copying
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user