summaryrefslogtreecommitdiff
path: root/src/core/file_sys
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2021-01-15 04:25:40 -0300
committerGravatar ReinUsesLisp2021-01-15 16:27:28 -0300
commit3ff978aa4f6b9d46179e41c36825eb06e7f8d60c (patch)
treeb785496e5fb574c0df48ebba7d8a518eb9adde21 /src/core/file_sys
parentMerge pull request #5354 from ReinUsesLisp/remove-common-color (diff)
downloadyuzu-3ff978aa4f6b9d46179e41c36825eb06e7f8d60c.tar.gz
yuzu-3ff978aa4f6b9d46179e41c36825eb06e7f8d60c.tar.xz
yuzu-3ff978aa4f6b9d46179e41c36825eb06e7f8d60c.zip
common/common_funcs: Rename INSERT_UNION_PADDING_{BYTES,WORDS} to _NOINIT
INSERT_PADDING_BYTES_NOINIT is more descriptive of the underlying behavior.
Diffstat (limited to 'src/core/file_sys')
-rw-r--r--src/core/file_sys/content_archive.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/core/file_sys/content_archive.cpp b/src/core/file_sys/content_archive.cpp
index a6c0337fa..d12218fc2 100644
--- a/src/core/file_sys/content_archive.cpp
+++ b/src/core/file_sys/content_archive.cpp
@@ -43,17 +43,17 @@ static_assert(sizeof(IVFCLevel) == 0x18, "IVFCLevel has incorrect size.");
43struct IVFCHeader { 43struct IVFCHeader {
44 u32_le magic; 44 u32_le magic;
45 u32_le magic_number; 45 u32_le magic_number;
46 INSERT_UNION_PADDING_BYTES(8); 46 INSERT_PADDING_BYTES_NOINIT(8);
47 std::array<IVFCLevel, 6> levels; 47 std::array<IVFCLevel, 6> levels;
48 INSERT_UNION_PADDING_BYTES(64); 48 INSERT_PADDING_BYTES_NOINIT(64);
49}; 49};
50static_assert(sizeof(IVFCHeader) == 0xE0, "IVFCHeader has incorrect size."); 50static_assert(sizeof(IVFCHeader) == 0xE0, "IVFCHeader has incorrect size.");
51 51
52struct NCASectionHeaderBlock { 52struct NCASectionHeaderBlock {
53 INSERT_UNION_PADDING_BYTES(3); 53 INSERT_PADDING_BYTES_NOINIT(3);
54 NCASectionFilesystemType filesystem_type; 54 NCASectionFilesystemType filesystem_type;
55 NCASectionCryptoType crypto_type; 55 NCASectionCryptoType crypto_type;
56 INSERT_UNION_PADDING_BYTES(3); 56 INSERT_PADDING_BYTES_NOINIT(3);
57}; 57};
58static_assert(sizeof(NCASectionHeaderBlock) == 0x8, "NCASectionHeaderBlock has incorrect size."); 58static_assert(sizeof(NCASectionHeaderBlock) == 0x8, "NCASectionHeaderBlock has incorrect size.");
59 59
@@ -61,7 +61,7 @@ struct NCASectionRaw {
61 NCASectionHeaderBlock header; 61 NCASectionHeaderBlock header;
62 std::array<u8, 0x138> block_data; 62 std::array<u8, 0x138> block_data;
63 std::array<u8, 0x8> section_ctr; 63 std::array<u8, 0x8> section_ctr;
64 INSERT_UNION_PADDING_BYTES(0xB8); 64 INSERT_PADDING_BYTES_NOINIT(0xB8);
65}; 65};
66static_assert(sizeof(NCASectionRaw) == 0x200, "NCASectionRaw has incorrect size."); 66static_assert(sizeof(NCASectionRaw) == 0x200, "NCASectionRaw has incorrect size.");
67 67
@@ -69,19 +69,19 @@ struct PFS0Superblock {
69 NCASectionHeaderBlock header_block; 69 NCASectionHeaderBlock header_block;
70 std::array<u8, 0x20> hash; 70 std::array<u8, 0x20> hash;
71 u32_le size; 71 u32_le size;
72 INSERT_UNION_PADDING_BYTES(4); 72 INSERT_PADDING_BYTES_NOINIT(4);
73 u64_le hash_table_offset; 73 u64_le hash_table_offset;
74 u64_le hash_table_size; 74 u64_le hash_table_size;
75 u64_le pfs0_header_offset; 75 u64_le pfs0_header_offset;
76 u64_le pfs0_size; 76 u64_le pfs0_size;
77 INSERT_UNION_PADDING_BYTES(0x1B0); 77 INSERT_PADDING_BYTES_NOINIT(0x1B0);
78}; 78};
79static_assert(sizeof(PFS0Superblock) == 0x200, "PFS0Superblock has incorrect size."); 79static_assert(sizeof(PFS0Superblock) == 0x200, "PFS0Superblock has incorrect size.");
80 80
81struct RomFSSuperblock { 81struct RomFSSuperblock {
82 NCASectionHeaderBlock header_block; 82 NCASectionHeaderBlock header_block;
83 IVFCHeader ivfc; 83 IVFCHeader ivfc;
84 INSERT_UNION_PADDING_BYTES(0x118); 84 INSERT_PADDING_BYTES_NOINIT(0x118);
85}; 85};
86static_assert(sizeof(RomFSSuperblock) == 0x200, "RomFSSuperblock has incorrect size."); 86static_assert(sizeof(RomFSSuperblock) == 0x200, "RomFSSuperblock has incorrect size.");
87 87
@@ -89,19 +89,19 @@ struct BKTRHeader {
89 u64_le offset; 89 u64_le offset;
90 u64_le size; 90 u64_le size;
91 u32_le magic; 91 u32_le magic;
92 INSERT_UNION_PADDING_BYTES(0x4); 92 INSERT_PADDING_BYTES_NOINIT(0x4);
93 u32_le number_entries; 93 u32_le number_entries;
94 INSERT_UNION_PADDING_BYTES(0x4); 94 INSERT_PADDING_BYTES_NOINIT(0x4);
95}; 95};
96static_assert(sizeof(BKTRHeader) == 0x20, "BKTRHeader has incorrect size."); 96static_assert(sizeof(BKTRHeader) == 0x20, "BKTRHeader has incorrect size.");
97 97
98struct BKTRSuperblock { 98struct BKTRSuperblock {
99 NCASectionHeaderBlock header_block; 99 NCASectionHeaderBlock header_block;
100 IVFCHeader ivfc; 100 IVFCHeader ivfc;
101 INSERT_UNION_PADDING_BYTES(0x18); 101 INSERT_PADDING_BYTES_NOINIT(0x18);
102 BKTRHeader relocation; 102 BKTRHeader relocation;
103 BKTRHeader subsection; 103 BKTRHeader subsection;
104 INSERT_UNION_PADDING_BYTES(0xC0); 104 INSERT_PADDING_BYTES_NOINIT(0xC0);
105}; 105};
106static_assert(sizeof(BKTRSuperblock) == 0x200, "BKTRSuperblock has incorrect size."); 106static_assert(sizeof(BKTRSuperblock) == 0x200, "BKTRSuperblock has incorrect size.");
107 107