diff --git a/include/instance.hpp b/include/instance.hpp index f80e201..17425cd 100644 --- a/include/instance.hpp +++ b/include/instance.hpp @@ -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. diff --git a/src/instance.cpp b/src/instance.cpp index 15783ad..c765345 100644 --- a/src/instance.cpp +++ b/src/instance.cpp @@ -18,18 +18,15 @@ #include "log.hpp" #include "return_types.hpp" -#include - 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