From 86cebd4ccae1d0c5702ad75f1b0fb0d634bb8680 Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Tue, 12 Jul 2016 15:44:36 +0300 Subject: [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. --- include/mbgl/style/conversion.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/mbgl/style/conversion.hpp') diff --git a/include/mbgl/style/conversion.hpp b/include/mbgl/style/conversion.hpp index bd7db3adfb..e53adcb942 100644 --- a/include/mbgl/style/conversion.hpp +++ b/include/mbgl/style/conversion.hpp @@ -2,6 +2,8 @@ #include +#include + namespace mbgl { namespace style { namespace conversion { @@ -53,7 +55,7 @@ namespace conversion { them for v8 types. */ -struct Error { const char * message; }; +struct Error { std::string message; }; template class Result : private variant { -- cgit v1.2.1