Rename answer to answer_type.
This commit is contained in:
parent
8c2d4c8b97
commit
5f96861ea8
|
@ -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
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue