Replace if constexpr with preprocessor if.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
c47a62969f
commit
20167fdce3
|
@ -183,16 +183,17 @@ void CURLWrapper::set_access_token(const string_view access_token)
|
|||
_curl_buffer_error};
|
||||
}
|
||||
|
||||
if constexpr (LIBCURL_VERSION_NUM >= 0x073d00) // libcurl >= 7.61.0.
|
||||
#if LIBCURL_VERSION_NUM >= 0x073d00 // libcurl >= 7.61.0.
|
||||
{
|
||||
//NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg,hicpp-signed-bitwise)
|
||||
code = curl_easy_setopt(_connection, CURLOPT_HTTPAUTH, CURLAUTH_BEARER);
|
||||
}
|
||||
else
|
||||
#else
|
||||
{
|
||||
//NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg,hicpp-signed-bitwise)
|
||||
code = curl_easy_setopt(_connection, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
|
||||
}
|
||||
#endif
|
||||
if (code != CURLE_OK)
|
||||
{
|
||||
throw CURLException{code, "Could not set authorization token.",
|
||||
|
|
Loading…
Reference in New Issue
Block a user