summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authortastytea2020-01-10 17:15:23 +0100
committertastytea2020-01-10 17:15:23 +0100
commit20167fdce3e9412440131632ed06b84db0a976b5 (patch)
tree5aa432d3b5eae64f15ac73dbed03c77490b07a24 /src
parentc47a62969f1733ec32f503b335738f4e438ee7b3 (diff)
downloadmastodonpp-20167fdce3e9412440131632ed06b84db0a976b5.tar
mastodonpp-20167fdce3e9412440131632ed06b84db0a976b5.tar.gz
mastodonpp-20167fdce3e9412440131632ed06b84db0a976b5.zip
Replace if constexpr with preprocessor if.
Diffstat (limited to 'src')
-rw-r--r--src/curl_wrapper.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/curl_wrapper.cpp b/src/curl_wrapper.cpp
index 0c9a3f6..97894e0 100644
--- a/src/curl_wrapper.cpp
+++ b/src/curl_wrapper.cpp
@@ -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.",