Replace if constexpr with preprocessor if.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
tastytea 2020-01-10 17:15:23 +01:00
parent c47a62969f
commit 20167fdce3
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07

View File

@ -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.",