diff options
| author | Tilka <tilkax@gmail.com> | 2022-05-09 22:28:59 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-09 22:28:59 +0100 |
| commit | a768dc6f809db3f0ba2fe003af504e1cfebe8c7a (patch) | |
| tree | 4bdfc57b013dc40daba0c51a47f5ddb029e5520c /Source | |
| parent | f05cd31d7d81312deba6d766f447de169ea6a922 (diff) | |
| parent | edec1d5e3a13330ccf7f38fc75fdc51897232f34 (diff) | |
Merge pull request #10374 from Pokechu22/slots-unused-warning
Work around false SLOTS defined but not used warning on GCC
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/Core/HW/EXI/EXI.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/Core/Core/HW/EXI/EXI.h b/Source/Core/Core/HW/EXI/EXI.h index f466b0428b..01661a0920 100644 --- a/Source/Core/Core/HW/EXI/EXI.h +++ b/Source/Core/Core/HW/EXI/EXI.h @@ -37,10 +37,12 @@ enum class Slot : int B, SP1, }; -static constexpr auto SLOTS = {Slot::A, Slot::B, Slot::SP1}; -static constexpr auto MAX_SLOT = Slot::SP1; -static constexpr auto MEMCARD_SLOTS = {Slot::A, Slot::B}; -static constexpr auto MAX_MEMCARD_SLOT = Slot::B; +// Note: using auto here results in a false warning on GCC +// See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80351 +constexpr std::initializer_list<Slot> SLOTS = {Slot::A, Slot::B, Slot::SP1}; +constexpr auto MAX_SLOT = Slot::SP1; +constexpr std::initializer_list<Slot> MEMCARD_SLOTS = {Slot::A, Slot::B}; +constexpr auto MAX_MEMCARD_SLOT = Slot::B; constexpr bool IsMemcardSlot(Slot slot) { return slot == Slot::A || slot == Slot::B; |
