[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:
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user