mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-14 18:58:36 +12:00
Formatting Library: Implement byte arrays formatting
This commit is contained in:
parent
1f6ca25820
commit
1e9afdc289
3 changed files with 63 additions and 16 deletions
|
@ -160,21 +160,7 @@ void fmt_class_string<SceNpCommunicationSignature>::format(std::string& out, u64
|
|||
{
|
||||
const auto& sign = get_object(arg);
|
||||
|
||||
// Format as a C byte array for ease of use
|
||||
fmt::append(out, "{ ");
|
||||
|
||||
for (usz i = 0;; i++)
|
||||
{
|
||||
if (i == std::size(sign.data) - 1)
|
||||
{
|
||||
fmt::append(out, "0x%02X", sign.data[i]);
|
||||
break;
|
||||
}
|
||||
|
||||
fmt::append(out, "0x%02X, ", sign.data[i]);
|
||||
}
|
||||
|
||||
fmt::append(out, " }");
|
||||
fmt::append(out, "%s", sign.data);
|
||||
}
|
||||
|
||||
// Helpers
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue