diff options
author | tastytea | 2020-03-20 16:29:16 +0100 |
---|---|---|
committer | tastytea | 2020-03-20 16:29:16 +0100 |
commit | b5144fd9ceeabe090f33396a3ae7f6550d1dafa4 (patch) | |
tree | e4d3a107a1926f5d4a03f7fdcfa16a62cc0af260 | |
parent | 0bbc6ac4c78df096b40350cf33f88b11231b343c (diff) | |
download | mastodonpp-b5144fd9ceeabe090f33396a3ae7f6550d1dafa4.tar mastodonpp-b5144fd9ceeabe090f33396a3ae7f6550d1dafa4.tar.gz mastodonpp-b5144fd9ceeabe090f33396a3ae7f6550d1dafa4.zip |
Ensure that the first parameter in all GET calls is prefaced with ?.
All calls to CURLWrapper::add_parameters_to_uri() but the first used & for all
parameters, because the boolean keeping track was implemented wrong.
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/curl_wrapper.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f69652b..6adb0bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ set(CMAKE_BUILD_TYPE "Release" CACHE STRING "The type of build.") option(BUILD_SHARED_LIBS "Build shared libraries." YES) project(mastodonpp - VERSION 0.5.2 + VERSION 0.5.3 DESCRIPTION "C++ wrapper for the Mastodon and Pleroma APIs." LANGUAGES CXX) diff --git a/src/curl_wrapper.cpp b/src/curl_wrapper.cpp index 0d78e6d..28292d9 100644 --- a/src/curl_wrapper.cpp +++ b/src/curl_wrapper.cpp @@ -405,6 +405,7 @@ bool CURLWrapper::replace_parameter_in_uri(string &uri, void CURLWrapper::add_parameters_to_uri(string &uri, const parametermap ¶meters) { + bool first{true}; // Replace <ID> with the value of parameter “id” and so on. for (const auto ¶m : parameters) { @@ -413,7 +414,6 @@ void CURLWrapper::add_parameters_to_uri(string &uri, continue; } - static bool first{true}; if (first) { uri += "?"; |