mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 00:41:26 +12:00
Fix building on OS X 10.10
This commit is contained in:
parent
73d63c508a
commit
00e637645c
6 changed files with 145 additions and 10 deletions
|
@ -263,6 +263,30 @@ namespace fmt
|
|||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct get_fmt<unsigned long>
|
||||
{
|
||||
static std::string text(const char* fmt, size_t len, unsigned long arg)
|
||||
{
|
||||
if (fmt[len - 1] == 'x')
|
||||
{
|
||||
return to_hex(arg, get_fmt_precision(fmt, len));
|
||||
}
|
||||
else if (fmt[len - 1] == 'X')
|
||||
{
|
||||
return fmt::toupper(to_hex(arg, get_fmt_precision(fmt, len)));
|
||||
}
|
||||
else if (fmt[len - 1] == 'd' || fmt[len - 1] == 'u')
|
||||
{
|
||||
return to_udec(arg);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw "Invalid formatting (unsigned long): " + std::string(fmt, len);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct get_fmt<u64>
|
||||
{
|
||||
|
@ -359,6 +383,30 @@ namespace fmt
|
|||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct get_fmt<long>
|
||||
{
|
||||
static std::string text(const char* fmt, size_t len, long arg)
|
||||
{
|
||||
if (fmt[len - 1] == 'x')
|
||||
{
|
||||
return to_hex((u64)arg, get_fmt_precision(fmt, len));
|
||||
}
|
||||
else if (fmt[len - 1] == 'X')
|
||||
{
|
||||
return fmt::toupper(to_hex((u64)arg, get_fmt_precision(fmt, len)));
|
||||
}
|
||||
else if (fmt[len - 1] == 'd')
|
||||
{
|
||||
return to_sdec(arg);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw "Invalid formatting (long): " + std::string(fmt, len);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct get_fmt<s64>
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue