From 5f96861ea8dae0b4149a970dc29c31947a524a98 Mon Sep 17 00:00:00 2001 From: tastytea Date: Sat, 4 Jan 2020 09:12:00 +0100 Subject: [PATCH] Rename answer to answer_type. --- include/return_types.hpp | 5 +++-- src/return_types.cpp | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/return_types.hpp b/include/return_types.hpp index 28cdca5..f7e7f03 100644 --- a/include/return_types.hpp +++ b/include/return_types.hpp @@ -39,7 +39,7 @@ using std::string_view; * | --------: |:-------------------------------------------------------------| * | 0 | No error. | */ -struct answer +struct answer_type { /*! * @brief @ref error "Error code". @@ -85,7 +85,8 @@ struct answer * * @since 0.1.0 */ - friend std::ostream &operator <<(std::ostream &out, const answer &answer); + friend std::ostream &operator <<(std::ostream &out, + const answer_type &answer); }; } // namespace mastodonpp diff --git a/src/return_types.cpp b/src/return_types.cpp index 6367f7c..3a7b30f 100644 --- a/src/return_types.cpp +++ b/src/return_types.cpp @@ -19,17 +19,17 @@ namespace mastodonpp { -answer::operator bool() const +answer_type::operator bool() const { return (error_code == 0); } -answer::operator string_view() const +answer_type::operator string_view() const { return body; } -std::ostream &operator <<(std::ostream &out, const answer &answer) +std::ostream &operator <<(std::ostream &out, const answer_type &answer) { out << answer.body; return out;