summaryrefslogtreecommitdiff
path: root/bin
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 /bin
parent70d5972e104aac91f4198540d4af14562e92d555 (diff)
downloadqtlocation-mapboxgl-8bf66ef7a71ea220f2ed30ddd7feda28805dde41.tar.gz
[core] remove some uses of <iostream> and <sstream>
Diffstat (limited to 'bin')
-rw-r--r--bin/offline.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/bin/offline.cpp b/bin/offline.cpp
index 5123e7b926..0d0fe57281 100644
--- a/bin/offline.cpp
+++ b/bin/offline.cpp
@@ -53,6 +53,27 @@ mapbox::geometry::geometry<double> parseGeometry(const std::string& json) {
});
}
+std::ostream& operator<<(std::ostream& os, mbgl::Response::Error::Reason r) {
+ switch (r) {
+ case mbgl::Response::Error::Reason::Success:
+ return os << "Response::Error::Reason::Success";
+ case mbgl::Response::Error::Reason::NotFound:
+ return os << "Response::Error::Reason::NotFound";
+ case mbgl::Response::Error::Reason::Server:
+ return os << "Response::Error::Reason::Server";
+ case mbgl::Response::Error::Reason::Connection:
+ return os << "Response::Error::Reason::Connection";
+ case mbgl::Response::Error::Reason::RateLimit:
+ return os << "Response::Error::Reason::RateLimit";
+ case mbgl::Response::Error::Reason::Other:
+ return os << "Response::Error::Reason::Other";
+ }
+
+ // The above switch is exhaustive, but placate GCC nonetheless:
+ assert(false);
+ return os;
+}
+
int main(int argc, char *argv[]) {
args::ArgumentParser argumentParser("Mapbox GL offline tool");
args::HelpFlag helpFlag(argumentParser, "help", "Display this help menu", {'h', "help"});