소스 검색

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.
Lioncash 8 년 전
부모
커밋
c65a8fafa0
1개의 변경된 파일1개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 4
      src/common/telemetry.h

+ 1 - 4
src/common/telemetry.h

@@ -52,10 +52,7 @@ public:
 template <typename T>
 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;