mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-04 16:53:48 -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
|
@ -21,7 +21,7 @@ namespace ams::ncm {
|
|||
|
||||
void GetStringFromBytes(char *dst, const void *src, size_t count) {
|
||||
for (size_t i = 0; i < count; i++) {
|
||||
std::snprintf(dst + 2 * i, 3, "%02x", static_cast<const u8 *>(src)[i]);
|
||||
util::SNPrintf(dst + 2 * i, 3, "%02x", static_cast<const u8 *>(src)[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -68,14 +68,14 @@ namespace ams::ncm {
|
|||
AMS_ABORT_UNLESS(dst_size > TicketFileStringLength);
|
||||
ContentIdString str;
|
||||
GetStringFromRightsId(str.data, sizeof(str), id);
|
||||
std::snprintf(dst, dst_size, "%s.tik", str.data);
|
||||
util::SNPrintf(dst, dst_size, "%s.tik", str.data);
|
||||
}
|
||||
|
||||
void GetCertificateFileStringFromRightsId(char *dst, size_t dst_size, fs::RightsId id) {
|
||||
AMS_ABORT_UNLESS(dst_size > CertFileStringLength);
|
||||
ContentIdString str;
|
||||
GetStringFromRightsId(str.data, sizeof(str), id);
|
||||
std::snprintf(dst, dst_size, "%s.cert", str.data);
|
||||
util::SNPrintf(dst, dst_size, "%s.cert", str.data);
|
||||
}
|
||||
|
||||
std::optional<ContentId> GetContentIdFromString(const char *str, size_t len) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue