Skip to content
Snippets Groups Projects
Commit 881bb229 authored by Lioncash's avatar Lioncash
Browse files

telemetry_json: Take std::string parameters by value

Taking them by const reference isn't advisable here, because it means
the std::move calls were doing nothing and we were always copying the
std::string instances.
parent a34e5e51
No related branches found
No related tags found
No related merge requests found
......@@ -8,8 +8,7 @@
namespace WebService {
TelemetryJson::TelemetryJson(const std::string& host, const std::string& username,
const std::string& token)
TelemetryJson::TelemetryJson(std::string host, std::string username, std::string token)
: host(std::move(host)), username(std::move(username)), token(std::move(token)) {}
TelemetryJson::~TelemetryJson() = default;
......
......@@ -18,7 +18,7 @@ namespace WebService {
*/
class TelemetryJson : public Telemetry::VisitorInterface {
public:
TelemetryJson(const std::string& host, const std::string& username, const std::string& token);
TelemetryJson(std::string host, std::string username, std::string token);
~TelemetryJson();
void Visit(const Telemetry::Field<bool>& field) override;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment