mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-10 07:40:03 -06:00
cmCurl: Improve signature of cmCurlParseTLSVersion
Avoid requiring caller to allocate a string.
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
} \
|
||||
} while (false)
|
||||
|
||||
cm::optional<int> cmCurlParseTLSVersion(std::string const& tls_version)
|
||||
cm::optional<int> cmCurlParseTLSVersion(cm::string_view tls_version)
|
||||
{
|
||||
cm::optional<int> v;
|
||||
if (tls_version == "1.0"_s) {
|
||||
|
||||
@@ -7,10 +7,11 @@
|
||||
#include <string>
|
||||
|
||||
#include <cm/optional>
|
||||
#include <cm/string_view>
|
||||
|
||||
#include <cm3p/curl/curl.h>
|
||||
|
||||
cm::optional<int> cmCurlParseTLSVersion(std::string const& tls_version);
|
||||
cm::optional<int> cmCurlParseTLSVersion(cm::string_view tls_version);
|
||||
std::string cmCurlSetCAInfo(::CURL* curl, const std::string& cafile = {});
|
||||
std::string cmCurlSetNETRCOption(::CURL* curl, const std::string& netrc_level,
|
||||
const std::string& netrc_file);
|
||||
|
||||
Reference in New Issue
Block a user