diff options
author | tastytea | 2020-01-04 09:12:00 +0100 |
---|---|---|
committer | tastytea | 2020-01-04 09:12:00 +0100 |
commit | 5f96861ea8dae0b4149a970dc29c31947a524a98 (patch) | |
tree | c829b2f2a62ffc59d0cc93679b5e1209e15eb02f | |
parent | 8c2d4c8b9752763438b5f91943899c445fe23903 (diff) | |
download | mastodonpp-5f96861ea8dae0b4149a970dc29c31947a524a98.tar mastodonpp-5f96861ea8dae0b4149a970dc29c31947a524a98.tar.gz mastodonpp-5f96861ea8dae0b4149a970dc29c31947a524a98.zip |
Rename answer to answer_type.
-rw-r--r-- | include/return_types.hpp | 5 | ||||
-rw-r--r-- | 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; |