From abc5441a50333ad40189cb69ee0314615681c62b Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Sun, 6 Sep 2020 17:10:35 +0100 Subject: [PATCH] Only print ping stuff in debug --- src/main.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 46dda43..d5ceea1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -22,7 +22,9 @@ #include "app_config.hpp" #include "duckhandy/int_conv.hpp" #include "duckhandy/string_bt.hpp" -#include +#if !defined(NDEBUG) +# include +#endif #if defined(OROTOOL_WITH_RESTCCPP) # include #endif @@ -31,6 +33,7 @@ namespace { void print_ping(oro::Api& oro_api) { auto ping = oro_api.ping(false); +#if !defined(NDEBUG) std::cout << "date: " << ping.header.date << '\n'; std::cout << "rate limit: " << ping.header.rate_limit << '\n'; std::cout << "remaining: " << ping.header.rate_limit_remaining << '\n'; @@ -41,6 +44,9 @@ namespace { std::cout << "timestamp: " << ping.data.generation_timestamp << '\n'; std::cout << "answer: " << ping.data.message << '\n'; std::cout << "version: " << ping.data.version << '\n'; +#else + static_cast(ping); +#endif } constexpr auto app_version() {