diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2018-10-18 18:41:59 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2018-10-23 12:23:40 +0200 |
commit | 8bf66ef7a71ea220f2ed30ddd7feda28805dde41 (patch) | |
tree | 9d12b8b9c40b76a5334d00b145931151accdbb8e /src/mbgl/sprite | |
parent | 70d5972e104aac91f4198540d4af14562e92d555 (diff) | |
download | qtlocation-mapboxgl-8bf66ef7a71ea220f2ed30ddd7feda28805dde41.tar.gz |
[core] remove some uses of <iostream> and <sstream>
Diffstat (limited to 'src/mbgl/sprite')
-rw-r--r-- | src/mbgl/sprite/sprite_parser.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/mbgl/sprite/sprite_parser.cpp b/src/mbgl/sprite/sprite_parser.cpp index 1a36e3e990..99e2b0c8ca 100644 --- a/src/mbgl/sprite/sprite_parser.cpp +++ b/src/mbgl/sprite/sprite_parser.cpp @@ -9,7 +9,6 @@ #include <cmath> #include <limits> -#include <sstream> namespace mbgl { @@ -91,9 +90,7 @@ std::vector<std::unique_ptr<style::Image>> parseSprite(const std::string& encode JSDocument doc; doc.Parse<0>(json.c_str()); if (doc.HasParseError()) { - std::stringstream message; - message << "Failed to parse JSON: " << rapidjson::GetParseError_En(doc.GetParseError()) << " at offset " << doc.GetErrorOffset(); - throw std::runtime_error(message.str()); + throw std::runtime_error("Failed to parse JSON: " + formatJSONParseError(doc)); } else if (!doc.IsObject()) { throw std::runtime_error("Sprite JSON root must be an object"); } else { |