diff --git a/src/lib/curl/Request.cxx b/src/lib/curl/Request.cxx index 45dd440ec..9a287503f 100644 --- a/src/lib/curl/Request.cxx +++ b/src/lib/curl/Request.cxx @@ -224,8 +224,8 @@ CurlRequest::HeaderFunction(StringView s) noexcept headers.emplace(std::move(name), std::string(value, end)); } -size_t -CurlRequest::_HeaderFunction(char *ptr, size_t size, size_t nmemb, +std::size_t +CurlRequest::_HeaderFunction(char *ptr, std::size_t size, std::size_t nmemb, void *stream) noexcept { CurlRequest &c = *(CurlRequest *)stream; @@ -236,8 +236,8 @@ CurlRequest::_HeaderFunction(char *ptr, size_t size, size_t nmemb, return size; } -inline size_t -CurlRequest::DataReceived(const void *ptr, size_t received_size) noexcept +inline std::size_t +CurlRequest::DataReceived(const void *ptr, std::size_t received_size) noexcept { assert(received_size > 0); @@ -251,8 +251,8 @@ CurlRequest::DataReceived(const void *ptr, size_t received_size) noexcept } -size_t -CurlRequest::WriteFunction(char *ptr, size_t size, size_t nmemb, +std::size_t +CurlRequest::WriteFunction(char *ptr, std::size_t size, std::size_t nmemb, void *stream) noexcept { CurlRequest &c = *(CurlRequest *)stream; diff --git a/src/lib/curl/Request.hxx b/src/lib/curl/Request.hxx index a43b29bf9..67785b1df 100644 --- a/src/lib/curl/Request.hxx +++ b/src/lib/curl/Request.hxx @@ -165,17 +165,17 @@ private: void FinishHeaders(); void FinishBody(); - size_t DataReceived(const void *ptr, size_t size) noexcept; + std::size_t DataReceived(const void *ptr, std::size_t size) noexcept; void HeaderFunction(StringView s) noexcept; /** called by curl when new data is available */ - static size_t _HeaderFunction(char *ptr, size_t size, size_t nmemb, - void *stream) noexcept; + static std::size_t _HeaderFunction(char *ptr, std::size_t size, std::size_t nmemb, + void *stream) noexcept; /** called by curl when new data is available */ - static size_t WriteFunction(char *ptr, size_t size, size_t nmemb, - void *stream) noexcept; + static std::size_t WriteFunction(char *ptr, std::size_t size, std::size_t nmemb, + void *stream) noexcept; }; #endif