summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Lioncash2018-07-18 00:32:32 -0400
committerGravatar Lioncash2018-07-18 00:32:35 -0400
commitc65a8fafa0fe68371b8b07ba190df78744983327 (patch)
treedb7b94c6a46972761ec012e9d78383175258c40a
parenttelemetry: Make operator== and operator!= const member functions of Field (diff)
downloadyuzu-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.h5
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:
52template <typename T> 52template <typename T>
53class Field : public FieldInterface { 53class Field : public FieldInterface {
54public: 54public:
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;