diff options
Diffstat (limited to 'src/common/telemetry.h')
| -rw-r--r-- | src/common/telemetry.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/common/telemetry.h b/src/common/telemetry.h index 4d632f7eb..3524c857e 100644 --- a/src/common/telemetry.h +++ b/src/common/telemetry.h | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | #include <map> | 8 | #include <map> |
| 9 | #include <memory> | 9 | #include <memory> |
| 10 | #include <string> | 10 | #include <string> |
| 11 | #include <string_view> | ||
| 11 | #include "common/common_funcs.h" | 12 | #include "common/common_funcs.h" |
| 12 | #include "common/common_types.h" | 13 | #include "common/common_types.h" |
| 13 | 14 | ||
| @@ -55,8 +56,8 @@ class Field : public FieldInterface { | |||
| 55 | public: | 56 | public: |
| 56 | YUZU_NON_COPYABLE(Field); | 57 | YUZU_NON_COPYABLE(Field); |
| 57 | 58 | ||
| 58 | Field(FieldType type_, std::string name_, T value_) | 59 | Field(FieldType type_, std::string_view name_, T value_) |
| 59 | : name(std::move(name_)), type(type_), value(std::move(value_)) {} | 60 | : name(name_), type(type_), value(std::move(value_)) {} |
| 60 | 61 | ||
| 61 | ~Field() override = default; | 62 | ~Field() override = default; |
| 62 | 63 | ||
| @@ -123,7 +124,7 @@ public: | |||
| 123 | * @param value Value for the field to add. | 124 | * @param value Value for the field to add. |
| 124 | */ | 125 | */ |
| 125 | template <typename T> | 126 | template <typename T> |
| 126 | void AddField(FieldType type, const char* name, T value) { | 127 | void AddField(FieldType type, std::string_view name, T value) { |
| 127 | return AddField(std::make_unique<Field<T>>(type, name, std::move(value))); | 128 | return AddField(std::make_unique<Field<T>>(type, name, std::move(value))); |
| 128 | } | 129 | } |
| 129 | 130 | ||