From deeff834101d87347b5806e9a6ddaa78d9dec269 Mon Sep 17 00:00:00 2001 From: tastytea Date: Sun, 26 Jan 2020 08:50:05 +0100 Subject: [PATCH] Make some private members of CURLWrapper static. replace_parameter_in_uri(), add_parameters_to_uri() and add_mime_part(). --- include/curl_wrapper.hpp | 10 ++++++---- src/curl_wrapper.cpp | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/curl_wrapper.hpp b/include/curl_wrapper.hpp index 0088197..f72847e 100644 --- a/include/curl_wrapper.hpp +++ b/include/curl_wrapper.hpp @@ -320,7 +320,8 @@ private: * * @since 0.1.0 */ - bool replace_parameter_in_uri(string &uri, const parameterpair ¶meter); + static bool replace_parameter_in_uri(string &uri, + const parameterpair ¶meter); /*! * @brief Add parameters to URI. @@ -330,7 +331,8 @@ private: * * @since 0.1.0 */ - void add_parameters_to_uri(string &uri, const parametermap ¶meters); + static void add_parameters_to_uri(string &uri, + const parametermap ¶meters); /*! * @brief Add `*curl_mimepart` to `*curl_mime`. @@ -341,8 +343,8 @@ private: * * @since 0.2.0 */ - void add_mime_part(curl_mime *mime, - string_view name, string_view data) const; + static void add_mime_part(curl_mime *mime, + string_view name, string_view data); /*! * @brief Convert parametermap to `*curl_mime`. diff --git a/src/curl_wrapper.cpp b/src/curl_wrapper.cpp index 01f1db1..97c519d 100644 --- a/src/curl_wrapper.cpp +++ b/src/curl_wrapper.cpp @@ -415,7 +415,7 @@ void CURLWrapper::add_parameters_to_uri(string &uri, } void CURLWrapper::add_mime_part(curl_mime *mime, - string_view name, string_view data) const + string_view name, string_view data) { curl_mimepart *part{curl_mime_addpart(mime)}; if (part == nullptr)