From 1764b13423059a06f718687c55d44bc20cc3330b Mon Sep 17 00:00:00 2001 From: Lioncache Date: Mon, 18 Dec 2023 12:55:11 -0500 Subject: [PATCH] Core/DSP/DSPTables: Make pdregname() and pdregnamelong() return std::string Keeps the interface consistent. --- Source/Core/Core/DSP/DSPTables.cpp | 4 ++-- Source/Core/Core/DSP/DSPTables.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Core/Core/DSP/DSPTables.cpp b/Source/Core/Core/DSP/DSPTables.cpp index 191f8b3622..175b7601c7 100644 --- a/Source/Core/Core/DSP/DSPTables.cpp +++ b/Source/Core/Core/DSP/DSPTables.cpp @@ -505,12 +505,12 @@ std::string pdname(u16 val) return fmt::format("0x{:04x}", val); } -const char* pdregname(int val) +std::string pdregname(int val) { return regnames[val].name; } -const char* pdregnamelong(int val) +std::string pdregnamelong(int val) { return regnames[val].description; } diff --git a/Source/Core/Core/DSP/DSPTables.h b/Source/Core/Core/DSP/DSPTables.h index 8dead3acad..e2ec833273 100644 --- a/Source/Core/Core/DSP/DSPTables.h +++ b/Source/Core/Core/DSP/DSPTables.h @@ -94,8 +94,8 @@ extern const std::array regnames; extern const std::array pdlabels; std::string pdname(u16 val); -const char* pdregname(int val); -const char* pdregnamelong(int val); +std::string pdregname(int val); +std::string pdregnamelong(int val); void InitInstructionTable();