mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-30 06:25:20 -04:00
ams: use util::SNPrintf over std:: (size/linker improvements)
This commit is contained in:
parent
9cfd259c5c
commit
094cede39e
41 changed files with 103 additions and 103 deletions
|
@ -135,7 +135,7 @@ namespace ams::fatal::srv::font {
|
|||
|
||||
std::va_list va_arg;
|
||||
va_start(va_arg, format);
|
||||
std::vsnprintf(char_buf, sizeof(char_buf), format, va_arg);
|
||||
util::VSNPrintf(char_buf, sizeof(char_buf), format, va_arg);
|
||||
va_end(va_arg);
|
||||
|
||||
PrintLine(char_buf);
|
||||
|
@ -150,7 +150,7 @@ namespace ams::fatal::srv::font {
|
|||
|
||||
std::va_list va_arg;
|
||||
va_start(va_arg, format);
|
||||
std::vsnprintf(char_buf, sizeof(char_buf), format, va_arg);
|
||||
util::VSNPrintf(char_buf, sizeof(char_buf), format, va_arg);
|
||||
va_end(va_arg);
|
||||
|
||||
Print(char_buf);
|
||||
|
@ -158,14 +158,14 @@ namespace ams::fatal::srv::font {
|
|||
|
||||
void PrintMonospaceU64(u64 x) {
|
||||
char char_buf[0x400];
|
||||
std::snprintf(char_buf, sizeof(char_buf), "%016lX", x);
|
||||
util::SNPrintf(char_buf, sizeof(char_buf), "%016lX", x);
|
||||
|
||||
DrawString(char_buf, false, true);
|
||||
}
|
||||
|
||||
void PrintMonospaceU32(u32 x) {
|
||||
char char_buf[0x400];
|
||||
std::snprintf(char_buf, sizeof(char_buf), "%08X", x);
|
||||
util::SNPrintf(char_buf, sizeof(char_buf), "%08X", x);
|
||||
|
||||
DrawString(char_buf, false, true);
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace ams::fatal::srv {
|
|||
{
|
||||
std::va_list vl;
|
||||
va_start(vl, fmt);
|
||||
std::vsnprintf(g_format_buffer, sizeof(g_format_buffer), fmt, vl);
|
||||
util::VSNPrintf(g_format_buffer, sizeof(g_format_buffer), fmt, vl);
|
||||
va_end(vl);
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ namespace ams::fatal::srv {
|
|||
{
|
||||
char hex[MaximumLineLength * 2 + 2] = {};
|
||||
for (size_t i = 0; i < cur_size; i++) {
|
||||
std::snprintf(hex + i * 2, 3, "%02X", data_u8[data_ofs++]);
|
||||
util::SNPrintf(hex + i * 2, 3, "%02X", data_u8[data_ofs++]);
|
||||
}
|
||||
hex[cur_size * 2 + 0] = '\n';
|
||||
hex[cur_size * 2 + 1] = '\x00';
|
||||
|
|
|
@ -75,7 +75,7 @@ namespace ams::fatal::srv {
|
|||
|
||||
/* Open report file. */
|
||||
{
|
||||
std::snprintf(file_path, sizeof(file_path) - 1, "sdmc:/atmosphere/fatal_reports/%011lu_%016lx.log", timestamp, static_cast<u64>(this->context->program_id));
|
||||
util::SNPrintf(file_path, sizeof(file_path) - 1, "sdmc:/atmosphere/fatal_reports/%011lu_%016lx.log", timestamp, static_cast<u64>(this->context->program_id));
|
||||
ScopedFile file(file_path);
|
||||
if (file.IsOpen()) {
|
||||
file.WriteFormat("Atmosphère Fatal Report (v1.1):\n");
|
||||
|
@ -137,7 +137,7 @@ namespace ams::fatal::srv {
|
|||
|
||||
/* Dump data to file. */
|
||||
{
|
||||
std::snprintf(file_path, sizeof(file_path) - 1, "sdmc:/atmosphere/fatal_reports/dumps/%011lu_%016lx.bin", timestamp, static_cast<u64>(this->context->program_id));
|
||||
util::SNPrintf(file_path, sizeof(file_path) - 1, "sdmc:/atmosphere/fatal_reports/dumps/%011lu_%016lx.bin", timestamp, static_cast<u64>(this->context->program_id));
|
||||
ScopedFile file(file_path);
|
||||
if (file.IsOpen()) {
|
||||
file.Write(this->context->tls_dump, sizeof(this->context->tls_dump));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue