mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-02 08:25:07 +01:00
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:
parent
3244042c4c
commit
0a8563fb79
@ -52,10 +52,7 @@ public:
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
class Field : public FieldInterface {
|
class Field : public FieldInterface {
|
||||||
public:
|
public:
|
||||||
Field(FieldType type, std::string name, const T& value)
|
Field(FieldType type, std::string name, T value)
|
||||||
: name(std::move(name)), type(type), value(value) {}
|
|
||||||
|
|
||||||
Field(FieldType type, std::string name, T&& value)
|
|
||||||
: name(std::move(name)), type(type), value(std::move(value)) {}
|
: name(std::move(name)), type(type), value(std::move(value)) {}
|
||||||
|
|
||||||
Field(const Field& other) = default;
|
Field(const Field& other) = default;
|
||||||
|
Loading…
Reference in New Issue
Block a user