Skip to content

Commit

Permalink
Add casts to resolve warnings about adding enums of different types
Browse files Browse the repository at this point in the history
These should not be permanent; the whole addition thing here is messy anyways
  • Loading branch information
Pokechu22 committed Jul 24, 2020
1 parent 0bb4ac4 commit 8836293
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Source/Core/Core/Movie.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ static bool s_bPolled = false;

// s_InputDisplay is used by both CPU and GPU (is mutable).
static std::mutex s_input_display_lock;
static std::array<std::string, SerialInterface::MAX_SI_CHANNELS + MAX_BBMOTES> s_InputDisplay;
static std::array<std::string, static_cast<size_t>(SerialInterface::MAX_SI_CHANNELS) + MAX_BBMOTES>
s_InputDisplay;

static GCManipFunction s_gc_manip_func;
static WiiManipFunction s_wii_manip_func;
Expand Down Expand Up @@ -867,7 +868,8 @@ void ReadHeader()
{
s_controllers = tmpHeader.controllers;
if (tmpHeader.bBalanceBoard)
s_controllers |= 1 << (SerialInterface::MAX_SI_CHANNELS + WIIMOTE_BALANCE_BOARD);
s_controllers |=
1 << (static_cast<size_t>(SerialInterface::MAX_SI_CHANNELS) + WIIMOTE_BALANCE_BOARD);
s_recordingStartTime = tmpHeader.recordingStartTime;
if (s_rerecords < tmpHeader.numRerecords)
s_rerecords = tmpHeader.numRerecords;
Expand Down Expand Up @@ -1324,7 +1326,8 @@ void SaveRecording(const std::string& filename)
header.bFollowBranch = SConfig::GetInstance().bJITFollowBranch;
header.controllers = s_controllers & (SConfig::GetInstance().bWii ? 0xFF : 0x0F);
header.bBalanceBoard =
(s_controllers & (1 << (SerialInterface::MAX_SI_CHANNELS + WIIMOTE_BALANCE_BOARD))) != 0;
(s_controllers &
(1 << (static_cast<size_t>(SerialInterface::MAX_SI_CHANNELS) + WIIMOTE_BALANCE_BOARD))) != 0;

header.bFromSaveState = s_bRecordingFromSaveState;
header.frameCount = s_totalFrames;
Expand Down

0 comments on commit 8836293

Please sign in to comment.