lib/curl/Adapter: use std::string_view
This commit is contained in:
parent
1da09f5b1b
commit
8783ed1981
@ -112,8 +112,10 @@ IsResponseBoundaryHeader(StringView s) noexcept
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline void
|
inline void
|
||||||
CurlResponseHandlerAdapter::HeaderFunction(StringView s) noexcept
|
CurlResponseHandlerAdapter::HeaderFunction(std::string_view _s) noexcept
|
||||||
{
|
{
|
||||||
|
const StringView s{_s};
|
||||||
|
|
||||||
if (state > State::HEADERS)
|
if (state > State::HEADERS)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -34,8 +34,8 @@
|
|||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
#include <string_view>
|
||||||
|
|
||||||
struct StringView;
|
|
||||||
class CurlEasy;
|
class CurlEasy;
|
||||||
class CurlResponseHandler;
|
class CurlResponseHandler;
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ private:
|
|||||||
void FinishHeaders();
|
void FinishHeaders();
|
||||||
void FinishBody();
|
void FinishBody();
|
||||||
|
|
||||||
void HeaderFunction(StringView s) noexcept;
|
void HeaderFunction(std::string_view s) noexcept;
|
||||||
|
|
||||||
/** called by curl when a new header is available */
|
/** called by curl when a new header is available */
|
||||||
static std::size_t _HeaderFunction(char *ptr,
|
static std::size_t _HeaderFunction(char *ptr,
|
||||||
|
@ -35,7 +35,6 @@
|
|||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
|
||||||
struct StringView;
|
|
||||||
class CurlGlobal;
|
class CurlGlobal;
|
||||||
class CurlResponseHandler;
|
class CurlResponseHandler;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user