[core] Report conversion errors using std::string

char* increases the risk of pointing to a invalid reference. Qt had
to use a static variable as retainer to workaround.
This commit is contained in:
Thiago Marcos P. Santos
2016-07-12 15:44:36 +03:00
parent e197540f9a
commit 86cebd4cca
5 changed files with 14 additions and 18 deletions

View File

@@ -83,7 +83,7 @@ void GeoJSONSource::Impl::load(FileSource& fileSource) {
conversion::Result<GeoJSON> geoJSON = conversion::convertGeoJSON<JSValue>(d);
if (!geoJSON) {
Log::Error(Event::ParseStyle, "Failed to parse GeoJSON data: %s", geoJSON.error().message);
Log::Error(Event::ParseStyle, "Failed to parse GeoJSON data: %s", geoJSON.error().message.c_str());
// Create an empty GeoJSON VT object to make sure we're not infinitely waiting for
// tiles to load.
mapbox::geojson::feature_collection features;