diff options
author | Thiago Marcos P. Santos <thiago@mapbox.com> | 2016-07-12 15:44:36 +0300 |
---|---|---|
committer | Thiago Marcos P. Santos <thiago@mapbox.com> | 2016-07-12 16:04:20 +0300 |
commit | 86cebd4ccae1d0c5702ad75f1b0fb0d634bb8680 (patch) | |
tree | 2bc9262589b1f47abb0cbdacbce0be13f6b60e89 /include | |
parent | e197540f9a6a48311eac4d8033fc0abb92b41d16 (diff) | |
download | qtlocation-mapboxgl-86cebd4ccae1d0c5702ad75f1b0fb0d634bb8680.tar.gz |
[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.
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/style/conversion.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
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 <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> { |