Rename answer to answer_type.

This commit is contained in:
tastytea 2020-01-04 09:12:00 +01:00
parent 8c2d4c8b97
commit 5f96861ea8
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 6 additions and 5 deletions

View File

@ -39,7 +39,7 @@ using std::string_view;
* | --------: |:-------------------------------------------------------------| * | --------: |:-------------------------------------------------------------|
* | 0 | No error. | * | 0 | No error. |
*/ */
struct answer struct answer_type
{ {
/*! /*!
* @brief @ref error "Error code". * @brief @ref error "Error code".
@ -85,7 +85,8 @@ struct answer
* *
* @since 0.1.0 * @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 } // namespace mastodonpp

View File

@ -19,17 +19,17 @@
namespace mastodonpp namespace mastodonpp
{ {
answer::operator bool() const answer_type::operator bool() const
{ {
return (error_code == 0); return (error_code == 0);
} }
answer::operator string_view() const answer_type::operator string_view() const
{ {
return body; return body;
} }
std::ostream &operator <<(std::ostream &out, const answer &answer) std::ostream &operator <<(std::ostream &out, const answer_type &answer)
{ {
out << answer.body; out << answer.body;
return out; return out;