common: Miscellaneous cleanups (#7239)

* code: Remove some old msvc workarounds

* android: Upgrade to NDK 26

* Allows access to newer libc++

* common/swap: Make use of std::endian

Allows removing a bunch of defines in favor of a two liner.

* common: Remove misc.cpp

* GetLastErrorMsg has been in error.h for a while and also helps removing a depedency from a hot header like common_funcs

* common: use SetThreadDescription API for thread names

* common: Remove linear disk cache

* Has never been used?

* bit_set: Make constexpr

* ring_buffer: Use feature macro

* bit_set: Use <bit> and concepts

* gsp_gpu: Restore comment

* core: Ignore GCC warning

---------

Co-authored-by: Lioncash <mathew1800@gmail.com>
Co-authored-by: Liam <byteslice@airmail.cc>
This commit is contained in:
GPUCode 2023-12-14 16:26:33 +02:00 committed by GitHub
parent 15ea0c6336
commit 2b20082581
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 50 additions and 426 deletions

View file

@ -4,7 +4,6 @@
#pragma once
#include <string>
#include "common/common_types.h"
/// Textually concatenates two tokens. The double-expansion is required by the C preprocessor.
@ -46,14 +45,8 @@ __declspec(dllimport) void __stdcall DebugBreak(void);
#endif
#ifdef _MSC_VER
#if (_MSC_VER < 1900)
// Function Cross-Compatibility
#define snprintf _snprintf
#endif
// Locale Cross-Compatibility
#define locale_t _locale_t
#endif // _MSC_VER
#define DECLARE_ENUM_FLAG_OPERATORS(type) \
@ -109,9 +102,3 @@ __declspec(dllimport) void __stdcall DebugBreak(void);
using T = std::underlying_type_t<type>; \
return static_cast<T>(key) == 0; \
}
// Generic function to get last error message.
// Call directly after the command or use the error num.
// This function might change the error code.
// Defined in Misc.cpp.
[[nodiscard]] std::string GetLastErrorMsg();