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.
This commit is contained in:
Lioncash 2018-07-18 16:18:30 -04:00
parent 3244042c4c
commit 0a8563fb79
1 changed files with 1 additions and 4 deletions

View File

@ -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& other) = default;