Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #10374 from Pokechu22/slots-unused-warning
Work around false SLOTS defined but not used warning on GCC
  • Loading branch information
Tilka committed May 9, 2022
2 parents f05cd31 + edec1d5 commit a768dc6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Source/Core/Core/HW/EXI/EXI.h
Expand Up @@ -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;
Expand Down

0 comments on commit a768dc6

Please sign in to comment.