From c65a8fafa0fe68371b8b07ba190df78744983327 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 18 Jul 2018 00:32:32 -0400 Subject: 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(-) (limited to 'src/common/telemetry.h') diff --git a/src/common/telemetry.h b/src/common/telemetry.h index 155cf59ff..3bab75b59 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&) = default; -- cgit v1.2.3