diff options
Diffstat (limited to 'bin/offline.cpp')
-rw-r--r-- | bin/offline.cpp | 21 |
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"}); |