diff options
| author | 2018-07-18 00:32:32 -0400 | |
|---|---|---|
| committer | 2018-07-18 00:32:35 -0400 | |
| commit | c65a8fafa0fe68371b8b07ba190df78744983327 (patch) | |
| tree | db7b94c6a46972761ec012e9d78383175258c40a | |
| parent | telemetry: Make operator== and operator!= const member functions of Field (diff) | |
| download | yuzu-c65a8fafa0fe68371b8b07ba190df78744983327.tar.gz yuzu-c65a8fafa0fe68371b8b07ba190df78744983327.tar.xz yuzu-c65a8fafa0fe68371b8b07ba190df78744983327.zip | |
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.
| -rw-r--r-- | src/common/telemetry.h | 5 |
1 files changed, 1 insertions, 4 deletions
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: | |||
| 52 | template <typename T> | 52 | template <typename T> |
| 53 | class Field : public FieldInterface { | 53 | class Field : public FieldInterface { |
| 54 | public: | 54 | public: |
| 55 | Field(FieldType type, std::string name, const T& value) | 55 | Field(FieldType type, std::string name, T value) |
| 56 | : name(std::move(name)), type(type), value(value) {} | ||
| 57 | |||
| 58 | Field(FieldType type, std::string name, T&& value) | ||
| 59 | : name(std::move(name)), type(type), value(std::move(value)) {} | 56 | : name(std::move(name)), type(type), value(std::move(value)) {} |
| 60 | 57 | ||
| 61 | Field(const Field&) = default; | 58 | Field(const Field&) = default; |