diff --git a/src/backend/x64/perf_map.cpp b/src/backend/x64/perf_map.cpp index beaf8b83..fee125de 100644 --- a/src/backend/x64/perf_map.cpp +++ b/src/backend/x64/perf_map.cpp @@ -45,7 +45,7 @@ void OpenFile() { } // anonymous namespace namespace detail { -void PerfMapRegister(const void* start, const void* end, const std::string& friendly_name) { +void PerfMapRegister(const void* start, const void* end, std::string_view friendly_name) { std::lock_guard guard{mutex}; if (!file) { @@ -79,7 +79,7 @@ void PerfMapClear() { namespace Dynarmic::BackendX64 { namespace detail { -void PerfMapRegister(const void*, const void*, const std::string&) {} +void PerfMapRegister(const void*, const void*, std::string_view) {} } // namespace detail void PerfMapClear() {} diff --git a/src/backend/x64/perf_map.h b/src/backend/x64/perf_map.h index 80f933fb..dbdd499d 100644 --- a/src/backend/x64/perf_map.h +++ b/src/backend/x64/perf_map.h @@ -8,17 +8,18 @@ #include #include +#include #include "common/cast_util.h" namespace Dynarmic::BackendX64 { namespace detail { -void PerfMapRegister(const void* start, const void* end, const std::string& friendly_name); +void PerfMapRegister(const void* start, const void* end, std::string_view friendly_name); } // namespace detail template -void PerfMapRegister(T start, const void* end, const std::string& friendly_name) { +void PerfMapRegister(T start, const void* end, std::string_view friendly_name) { detail::PerfMapRegister(Common::BitCast(start), end, friendly_name); }