lib/curl/Request: use std::size_t

This commit is contained in:
Max Kellermann 2021-12-07 12:00:09 +01:00 committed by Max Kellermann
parent 5cf6032c90
commit f8338d4f00
2 changed files with 11 additions and 11 deletions

View File

@ -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;

View File

@ -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