From 07d16594c91a1d3f2cec48e73142d1243dc891f9 Mon Sep 17 00:00:00 2001 From: tastytea Date: Sun, 5 Jan 2020 12:21:15 +0100 Subject: [PATCH] Add default values to answer_type and update documentation. --- include/return_types.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/return_types.hpp b/include/return_types.hpp index f0e1e02..65b8f6e 100644 --- a/include/return_types.hpp +++ b/include/return_types.hpp @@ -47,7 +47,7 @@ struct answer_type * * @since 0.1.0 */ - uint8_t curl_error_code; + uint8_t curl_error_code{0}; /*! * @brief The error message. @@ -61,7 +61,7 @@ struct answer_type * * @since 0.1.0 */ - uint16_t http_status; + uint16_t http_status{0}; /*! * @brief The headers of the response from the server. @@ -78,7 +78,8 @@ struct answer_type string body; /*! - * @brief Returns true if #error_code is 0, false otherwise. + * @brief Returns true if #curl_error_code is 0 and #http_status is 200, + * false otherwise. * * @since 0.1.0 */