mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-19 15:09:57 +00:00
Merge pull request #8587 from merryhime/padding-unused
common_funcs: Mark padding as [[maybe_unused]]
This commit is contained in:
commit
d2c0b45bca
1 changed files with 6 additions and 4 deletions
|
@ -18,14 +18,16 @@
|
||||||
/// Helper macros to insert unused bytes or words to properly align structs. These values will be
|
/// Helper macros to insert unused bytes or words to properly align structs. These values will be
|
||||||
/// zero-initialized.
|
/// zero-initialized.
|
||||||
#define INSERT_PADDING_BYTES(num_bytes) \
|
#define INSERT_PADDING_BYTES(num_bytes) \
|
||||||
std::array<u8, num_bytes> CONCAT2(pad, __LINE__) {}
|
[[maybe_unused]] std::array<u8, num_bytes> CONCAT2(pad, __LINE__) {}
|
||||||
#define INSERT_PADDING_WORDS(num_words) \
|
#define INSERT_PADDING_WORDS(num_words) \
|
||||||
std::array<u32, num_words> CONCAT2(pad, __LINE__) {}
|
[[maybe_unused]] std::array<u32, num_words> CONCAT2(pad, __LINE__) {}
|
||||||
|
|
||||||
/// These are similar to the INSERT_PADDING_* macros but do not zero-initialize the contents.
|
/// These are similar to the INSERT_PADDING_* macros but do not zero-initialize the contents.
|
||||||
/// This keeps the structure trivial to construct.
|
/// This keeps the structure trivial to construct.
|
||||||
#define INSERT_PADDING_BYTES_NOINIT(num_bytes) std::array<u8, num_bytes> CONCAT2(pad, __LINE__)
|
#define INSERT_PADDING_BYTES_NOINIT(num_bytes) \
|
||||||
#define INSERT_PADDING_WORDS_NOINIT(num_words) std::array<u32, num_words> CONCAT2(pad, __LINE__)
|
[[maybe_unused]] std::array<u8, num_bytes> CONCAT2(pad, __LINE__)
|
||||||
|
#define INSERT_PADDING_WORDS_NOINIT(num_words) \
|
||||||
|
[[maybe_unused]] std::array<u32, num_words> CONCAT2(pad, __LINE__)
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue