mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-28 01:52:29 -06:00
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.
This commit is contained in:
parent
c9013c481a
commit
8747d93f6a
2 changed files with 2 additions and 3 deletions
|
@ -8,8 +8,7 @@
|
||||||
|
|
||||||
namespace WebService {
|
namespace WebService {
|
||||||
|
|
||||||
TelemetryJson::TelemetryJson(const std::string& host, const std::string& username,
|
TelemetryJson::TelemetryJson(std::string host, std::string username, std::string token)
|
||||||
const std::string& token)
|
|
||||||
: host(std::move(host)), username(std::move(username)), token(std::move(token)) {}
|
: host(std::move(host)), username(std::move(username)), token(std::move(token)) {}
|
||||||
TelemetryJson::~TelemetryJson() = default;
|
TelemetryJson::~TelemetryJson() = default;
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ namespace WebService {
|
||||||
*/
|
*/
|
||||||
class TelemetryJson : public Telemetry::VisitorInterface {
|
class TelemetryJson : public Telemetry::VisitorInterface {
|
||||||
public:
|
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();
|
~TelemetryJson();
|
||||||
|
|
||||||
void Visit(const Telemetry::Field<bool>& field) override;
|
void Visit(const Telemetry::Field<bool>& field) override;
|
||||||
|
|
Loading…
Reference in a new issue