mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-14 10:48:36 +12:00
vm::ptr<char> formatting
This commit is contained in:
parent
8c8242345e
commit
fc56e70172
23 changed files with 198 additions and 165 deletions
|
@ -494,10 +494,34 @@ struct to_se<vm::_ptr_base<T, AT>, Se>
|
|||
template<typename T, typename AT>
|
||||
struct fmt_unveil<vm::_ptr_base<T, AT>, void>
|
||||
{
|
||||
using type = typename fmt_unveil<AT>::type;
|
||||
using type = vm::_ptr_base<T>; // Use only T, ignoring AT
|
||||
|
||||
static inline auto get(const vm::_ptr_base<T, AT>& arg)
|
||||
{
|
||||
return fmt_unveil<AT>::get(arg.addr());
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct fmt_class_string<vm::_ptr_base<const void>, void>
|
||||
{
|
||||
static void format(std::string& out, u64 arg);
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct fmt_class_string<vm::_ptr_base<T>, void> : fmt_class_string<vm::_ptr_base<const void>, void>
|
||||
{
|
||||
// Classify all pointers as const void*
|
||||
};
|
||||
|
||||
template<>
|
||||
struct fmt_class_string<vm::_ptr_base<const char>, void>
|
||||
{
|
||||
static void format(std::string& out, u64 arg);
|
||||
};
|
||||
|
||||
template<>
|
||||
struct fmt_class_string<vm::_ptr_base<char>, void> : fmt_class_string<vm::_ptr_base<const char>>
|
||||
{
|
||||
// Classify char* as const char*
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue