From 637a637626349dfc124b45a70925b89adac29342 Mon Sep 17 00:00:00 2001 From: Tomasz Golinski Date: Mon, 18 Jul 2022 19:05:52 +0200 Subject: [PATCH] Move constants around --- powertrail.cpp | 3 +++ powertrail.h | 5 +---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/powertrail.cpp b/powertrail.cpp index 596c571..9c827c5 100644 --- a/powertrail.cpp +++ b/powertrail.cpp @@ -11,6 +11,9 @@ using json = nlohmann::json; +static const std::string url = "https://opencaching.pl/powerTrail.php?ptAction=showSerie&ptrail="; +static const std::string url2 = "https://opencaching.pl/powerTrail/ajaxGetPowerTrailCaches.php?ptAction=showSerie&ptrail="; + static const std::regex regex_name("(.*?)"); static const std::regex regex_date("(.*?)"); static const std::regex regex_perc("(.*?)"); diff --git a/powertrail.h b/powertrail.h index bee01b9..8ee09b5 100644 --- a/powertrail.h +++ b/powertrail.h @@ -34,7 +34,7 @@ public: void get_trail(uint n); CURL* curl; - mutable std::string curl_output; + std::string curl_output; PowertrailDB(); ~PowertrailDB(); @@ -43,9 +43,6 @@ public: void save_to_json(std::string file); private: - inline const static std::string url = "https://opencaching.pl/powerTrail.php?ptAction=showSerie&ptrail="; - inline const static std::string url2 = "https://opencaching.pl/powerTrail/ajaxGetPowerTrailCaches.php?ptAction=showSerie&ptrail="; - static size_t write_cb(char* ptr, size_t size, size_t nmemb, void* userdata); };