mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-03-12 02:26:31 +00:00
perf_map: Use std::string_view instead of std::string for PerfMapRegister()
We can just use a non-owning view into a string in this case instead of potentially allocating a std::string instance.
This commit is contained in:
@@ -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() {}
|
||||
|
||||
Reference in New Issue
Block a user