Change signature of Instance.

This commit is contained in:
tastytea 2020-01-06 09:11:32 +01:00
parent a6bd081280
commit 6663cca653
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 5 additions and 7 deletions

View File

@ -50,7 +50,8 @@ public:
*
* @since 0.1.0
*/
explicit Instance(string hostname, string access_token);
explicit Instance(const string_view &hostname,
const string_view &access_token);
/*!
* @brief Returns the hostname.

View File

@ -18,18 +18,15 @@
#include "log.hpp"
#include "return_types.hpp"
#include <utility>
namespace mastodonpp
{
using std::stoull;
using std::move;
Instance::Instance(string hostname, string access_token)
: _hostname{move(hostname)}
Instance::Instance(const string_view &hostname, const string_view &access_token)
: _hostname{hostname}
, _baseuri{"https://" + _hostname}
, _access_token{move(access_token)}
, _access_token{access_token}
, _max_chars{500}
{
try