mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2025-06-14 22:57:58 -05:00
common/misc: Deduplicate code in GetLastErrorMsg()
Android and macOS have supported thread_local for quite a while, but most importantly is that we don't even really need it. Instead of using a thread-local buffer, we can just return a non-static buffer as a std::string, avoiding the need for that quality entirely.
This commit is contained in:
@ -4,6 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#if !defined(ARCHITECTURE_x86_64) && !defined(ARCHITECTURE_ARM)
|
||||
#include <cstdlib> // for exit
|
||||
#endif
|
||||
@ -90,7 +92,7 @@ __declspec(dllimport) void __stdcall DebugBreak(void);
|
||||
// Call directly after the command or use the error num.
|
||||
// This function might change the error code.
|
||||
// Defined in Misc.cpp.
|
||||
const char* GetLastErrorMsg();
|
||||
std::string GetLastErrorMsg();
|
||||
|
||||
namespace Common {
|
||||
|
||||
|
Reference in New Issue
Block a user