Bugfix: Error codes from send_post and send_toot were not reported back.

Because the variable was not a reference.
This commit is contained in:
tastytea 2018-10-08 01:22:34 +02:00
parent f64984f331
commit f1755d8de3
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
3 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.6)
project (mastodon-cpp
VERSION 0.18.5
VERSION 0.18.6
LANGUAGES CXX
)

View File

@ -287,14 +287,14 @@ public:
*
* @since 0.18.1
*/
const Status send_post(const Status &status, uint_fast16_t error = 0);
const Status send_post(const Status &status, uint_fast16_t &error);
/*!
* @brief Alias for send_post()
*
* @since 0.17.0
*/
const Status send_toot(const Status &status, uint_fast16_t error = 0);
const Status send_toot(const Status &status, uint_fast16_t &error);
/*!
* @brief Base class for all entities.

View File

@ -21,12 +21,12 @@
using namespace Mastodon;
const Easy::Status Easy::send_toot(const Status &status, uint_fast16_t error)
const Easy::Status Easy::send_toot(const Status &status, uint_fast16_t &error)
{
return send_post(status, error);
}
const Easy::Status Easy::send_post(const Status &status, uint_fast16_t error)
const Easy::Status Easy::send_post(const Status &status, uint_fast16_t &error)
{
API::parametermap parameters;
string answer;