From 96e9d9a9fd52a4a37dc6c05afa43f0df54e137ef Mon Sep 17 00:00:00 2001 From: tastytea Date: Sun, 5 Jan 2020 11:52:07 +0100 Subject: [PATCH] answer_type: Replace error_code with curl_error_code. --- include/return_types.hpp | 11 +++++------ src/return_types.cpp | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/include/return_types.hpp b/include/return_types.hpp index 9f6e53b..2913be0 100644 --- a/include/return_types.hpp +++ b/include/return_types.hpp @@ -36,19 +36,18 @@ using std::string_view; * * @headerfile return_types.hpp mastodonpp/return_types.hpp * - * @section error Error codes - * | Code | Explanation | - * | --------: |:-------------------------------------------------------------| - * | 0 | No error. | */ 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 */ - uint8_t error_code; + uint8_t curl_error_code; /*! * @brief The error message. * diff --git a/src/return_types.cpp b/src/return_types.cpp index 3a7b30f..9428e0d 100644 --- a/src/return_types.cpp +++ b/src/return_types.cpp @@ -21,7 +21,7 @@ namespace mastodonpp answer_type::operator bool() const { - return (error_code == 0); + return (curl_error_code == 0); } answer_type::operator string_view() const