summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortastytea2020-01-26 08:50:05 +0100
committertastytea2020-01-26 08:50:05 +0100
commitdeeff834101d87347b5806e9a6ddaa78d9dec269 (patch)
treedd3dc3c5e73f8e46c0b6aab78c3944f8c7555c81
parent3876cf3f01f7325d58c7cdf65e5d168fec9cd1c7 (diff)
downloadmastodonpp-deeff834101d87347b5806e9a6ddaa78d9dec269.tar
mastodonpp-deeff834101d87347b5806e9a6ddaa78d9dec269.tar.gz
mastodonpp-deeff834101d87347b5806e9a6ddaa78d9dec269.zip
Make some private members of CURLWrapper static.
replace_parameter_in_uri(), add_parameters_to_uri() and add_mime_part().
-rw-r--r--include/curl_wrapper.hpp10
-rw-r--r--src/curl_wrapper.cpp2
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 &parameter);
+ static bool replace_parameter_in_uri(string &uri,
+ const parameterpair &parameter);
/*!
* @brief Add parameters to URI.
@@ -330,7 +331,8 @@ private:
*
* @since 0.1.0
*/
- void add_parameters_to_uri(string &uri, const parametermap &parameters);
+ static void add_parameters_to_uri(string &uri,
+ const parametermap &parameters);
/*!
* @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)