summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-07-18 19:02:46 +0200
committerGitHub <noreply@github.com>2018-07-18 19:02:46 +0200
commite3da9fc3677087a267f489ea69bcdd312dd876fe (patch)
tree493c602ae5222c2afb55af6627a2e4d6b8608048 /src
parentMerge pull request #679 from lioncash/ctor (diff)
parenttelemetry: Remove unnecessary Field constructor (diff)
downloadyuzu-e3da9fc3677087a267f489ea69bcdd312dd876fe.tar
yuzu-e3da9fc3677087a267f489ea69bcdd312dd876fe.tar.gz
yuzu-e3da9fc3677087a267f489ea69bcdd312dd876fe.tar.bz2
yuzu-e3da9fc3677087a267f489ea69bcdd312dd876fe.tar.lz
yuzu-e3da9fc3677087a267f489ea69bcdd312dd876fe.tar.xz
yuzu-e3da9fc3677087a267f489ea69bcdd312dd876fe.tar.zst
yuzu-e3da9fc3677087a267f489ea69bcdd312dd876fe.zip
Diffstat (limited to 'src')
-rw-r--r--src/common/telemetry.h27
1 files changed, 7 insertions, 20 deletions
diff --git a/src/common/telemetry.h b/src/common/telemetry.h
index 7a09df0a7..3bab75b59 100644
--- a/src/common/telemetry.h
+++ b/src/common/telemetry.h
@@ -52,27 +52,14 @@ 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) : Field(other.type, other.name, other.value) {}
-
- Field& operator=(const Field& other) {
- type = other.type;
- name = other.name;
- value = other.value;
- return *this;
- }
+ Field(const Field&) = default;
+ Field& operator=(const Field&) = default;
- Field& operator=(Field&& other) {
- type = other.type;
- name = std::move(other.name);
- value = std::move(other.value);
- return *this;
- }
+ Field(Field&&) = default;
+ Field& operator=(Field&& other) = default;
void Accept(VisitorInterface& visitor) const override;
@@ -94,11 +81,11 @@ public:
return value;
}
- inline bool operator==(const Field<T>& other) {
+ bool operator==(const Field& other) const {
return (type == other.type) && (name == other.name) && (value == other.value);
}
- inline bool operator!=(const Field<T>& other) {
+ bool operator!=(const Field& other) const {
return !(*this == other);
}