summaryrefslogtreecommitdiff
path: root/src/mbgl/sprite
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2018-10-18 18:41:59 +0200
committerKonstantin Käfer <mail@kkaefer.com>2018-10-23 12:23:40 +0200
commit8bf66ef7a71ea220f2ed30ddd7feda28805dde41 (patch)
tree9d12b8b9c40b76a5334d00b145931151accdbb8e /src/mbgl/sprite
parent70d5972e104aac91f4198540d4af14562e92d555 (diff)
downloadqtlocation-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.cpp5
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 {