From 0a8563fb79ab690815264de55d8879ed8cdf51e7 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 18 Jul 2018 16:18:30 -0400 Subject: [PATCH] telemetry: Remove unnecessary Field constructor We can just take the value parameter by value which allows both moving into it, and copies at the same time, depending on the calling code. --- src/common/telemetry.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/common/telemetry.h b/src/common/telemetry.h index 701f5ed74..9439edde4 100644 --- a/src/common/telemetry.h +++ b/src/common/telemetry.h @@ -52,10 +52,7 @@ public: template class Field : public FieldInterface { public: - Field(FieldType type, std::string name, const T& value) - : name(std::move(name)), type(type), value(value) {} - - Field(FieldType type, std::string name, T&& value) + Field(FieldType type, std::string name, T value) : name(std::move(name)), type(type), value(std::move(value)) {} Field(const Field& other) = default;