answer_type: Replace error_code with curl_error_code.

This commit is contained in:
tastytea 2020-01-05 11:52:07 +01:00
parent 86078bb4d6
commit 96e9d9a9fd
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 6 additions and 7 deletions

View File

@ -36,19 +36,18 @@ using std::string_view;
* *
* @headerfile return_types.hpp mastodonpp/return_types.hpp * @headerfile return_types.hpp mastodonpp/return_types.hpp
* *
* @section error Error codes
* | Code | Explanation |
* | --------: |:-------------------------------------------------------------|
* | 0 | No error. |
*/ */
struct answer_type struct answer_type
{ {
/*! /*!
* @brief @ref error "Error code". * @brief The error code returned by libcurl.
*
* For more information consult
* [libcurl-errors(3)](https://curl.haxx.se/libcurl/c/libcurl-errors.html).
* *
* @since 0.1.0 * @since 0.1.0
*/ */
uint8_t error_code; uint8_t curl_error_code;
/*! /*!
* @brief The error message. * @brief The error message.
* *

View File

@ -21,7 +21,7 @@ namespace mastodonpp
answer_type::operator bool() const answer_type::operator bool() const
{ {
return (error_code == 0); return (curl_error_code == 0);
} }
answer_type::operator string_view() const answer_type::operator string_view() const