[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

@@ -2,6 +2,8 @@
#include <mbgl/util/variant.hpp>
#include <string>
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 T>
class Result : private variant<T, Error> {