mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-01 07:18:22 -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
|
@ -124,33 +124,33 @@ namespace ams::mitm::fs {
|
|||
|
||||
void FormatAtmosphereSdPath(char *dst_path, size_t dst_path_size, const char *src_path) {
|
||||
if (src_path[0] == '/') {
|
||||
std::snprintf(dst_path, dst_path_size, "/atmosphere%s", src_path);
|
||||
util::SNPrintf(dst_path, dst_path_size, "/atmosphere%s", src_path);
|
||||
} else {
|
||||
std::snprintf(dst_path, dst_path_size, "/atmosphere/%s", src_path);
|
||||
util::SNPrintf(dst_path, dst_path_size, "/atmosphere/%s", src_path);
|
||||
}
|
||||
}
|
||||
|
||||
void FormatAtmosphereSdPath(char *dst_path, size_t dst_path_size, const char *subdir, const char *src_path) {
|
||||
if (src_path[0] == '/') {
|
||||
std::snprintf(dst_path, dst_path_size, "/atmosphere/%s%s", subdir, src_path);
|
||||
util::SNPrintf(dst_path, dst_path_size, "/atmosphere/%s%s", subdir, src_path);
|
||||
} else {
|
||||
std::snprintf(dst_path, dst_path_size, "/atmosphere/%s/%s", subdir, src_path);
|
||||
util::SNPrintf(dst_path, dst_path_size, "/atmosphere/%s/%s", subdir, src_path);
|
||||
}
|
||||
}
|
||||
|
||||
void FormatAtmosphereSdPath(char *dst_path, size_t dst_path_size, ncm::ProgramId program_id, const char *src_path) {
|
||||
if (src_path[0] == '/') {
|
||||
std::snprintf(dst_path, dst_path_size, "/atmosphere/contents/%016lx%s", static_cast<u64>(program_id), src_path);
|
||||
util::SNPrintf(dst_path, dst_path_size, "/atmosphere/contents/%016lx%s", static_cast<u64>(program_id), src_path);
|
||||
} else {
|
||||
std::snprintf(dst_path, dst_path_size, "/atmosphere/contents/%016lx/%s", static_cast<u64>(program_id), src_path);
|
||||
util::SNPrintf(dst_path, dst_path_size, "/atmosphere/contents/%016lx/%s", static_cast<u64>(program_id), src_path);
|
||||
}
|
||||
}
|
||||
|
||||
void FormatAtmosphereSdPath(char *dst_path, size_t dst_path_size, ncm::ProgramId program_id, const char *subdir, const char *src_path) {
|
||||
if (src_path[0] == '/') {
|
||||
std::snprintf(dst_path, dst_path_size, "/atmosphere/contents/%016lx/%s%s", static_cast<u64>(program_id), subdir, src_path);
|
||||
util::SNPrintf(dst_path, dst_path_size, "/atmosphere/contents/%016lx/%s%s", static_cast<u64>(program_id), subdir, src_path);
|
||||
} else {
|
||||
std::snprintf(dst_path, dst_path_size, "/atmosphere/contents/%016lx/%s/%s", static_cast<u64>(program_id), subdir, src_path);
|
||||
util::SNPrintf(dst_path, dst_path_size, "/atmosphere/contents/%016lx/%s/%s", static_cast<u64>(program_id), subdir, src_path);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue