diff options
Diffstat (limited to 'src/common/telemetry.h')
-rw-r--r-- | src/common/telemetry.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/common/telemetry.h b/src/common/telemetry.h index d38aeac99..ba633d5a5 100644 --- a/src/common/telemetry.h +++ b/src/common/telemetry.h @@ -1,6 +1,5 @@ -// Copyright 2017 Citra Emulator Project -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. +// SPDX-FileCopyrightText: 2017 Citra Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -55,8 +54,8 @@ class Field : public FieldInterface { public: YUZU_NON_COPYABLE(Field); - Field(FieldType type_, std::string name_, T value_) - : name(std::move(name_)), type(type_), value(std::move(value_)) {} + Field(FieldType type_, std::string_view name_, T value_) + : name(name_), type(type_), value(std::move(value_)) {} ~Field() override = default; @@ -123,7 +122,7 @@ public: * @param value Value for the field to add. */ template <typename T> - void AddField(FieldType type, const char* name, T value) { + void AddField(FieldType type, std::string_view name, T value) { return AddField(std::make_unique<Field<T>>(type, name, std::move(value))); } @@ -171,6 +170,9 @@ struct VisitorInterface { struct NullVisitor final : public VisitorInterface { YUZU_NON_COPYABLE(NullVisitor); + NullVisitor() = default; + ~NullVisitor() override = default; + void Visit(const Field<bool>& /*field*/) override {} void Visit(const Field<double>& /*field*/) override {} void Visit(const Field<float>& /*field*/) override {} |