Skip to content

Commit

Permalink
resolve some trivial unix compile warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
poco0317 committed Jul 18, 2021
1 parent 31117f8 commit 75ec3f8
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 25 deletions.
9 changes: 5 additions & 4 deletions src/Etterna/Actor/Gameplay/PlayerReplay.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ class PlayerReplay : public Player
int rowToJudge = -1);

protected:
void UpdateHoldsAndRolls(float fDeltaTime,
const std::chrono::steady_clock::time_point& now);
void HandleTapRowScore(unsigned row);
void UpdateTapNotesMissedOlderThan(float fMissIfOlderThanSeconds);
void UpdateHoldsAndRolls(
float fDeltaTime,
const std::chrono::steady_clock::time_point& now) override;
void HandleTapRowScore(unsigned row) override;
void UpdateTapNotesMissedOlderThan(float fMissIfOlderThanSeconds) override;
};

#endif
3 changes: 2 additions & 1 deletion src/Etterna/Actor/Menus/OptionRow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -858,11 +858,12 @@ OptionRow::Reload()
AfterImportOptions(PLAYER_1);
// fall through
}

case RELOAD_CHANGED_ENABLED:
UpdateEnabledDisabled();
PositionUnderlines(PLAYER_1);
break;
default:
break;
}

// TODO: Nothing uses this yet and it causes skips when changing options.
Expand Down
2 changes: 1 addition & 1 deletion src/Etterna/Models/Misc/PlayerAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ PlayerAI::SetScoreData(HighScore* pHighScore, int firstRow, NoteData* pNoteData)
} else // Anything else (and we got this far without crashing) means
// it's not a Full Replay
{
trr.track = NULL;
trr.track = 0;
trr.type = TapNoteType_Empty;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Etterna/Screen/Gameplay/ScreenGameplayPractice.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class ScreenGameplayPractice : public ScreenGameplay
{
public:
virtual void FillPlayerInfo(PlayerInfo* playerInfoOut);
void FillPlayerInfo(PlayerInfo* playerInfoOut) override;
ScreenGameplayPractice();
void Init() override;
~ScreenGameplayPractice() override;
Expand Down
2 changes: 1 addition & 1 deletion src/Etterna/Screen/Gameplay/ScreenGameplayReplay.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class ScreenGameplayReplay : public ScreenGameplay
{
public:
virtual void FillPlayerInfo(PlayerInfo* playerInfoOut);
void FillPlayerInfo(PlayerInfo* playerInfoOut) override;
ScreenGameplayReplay();
void Init() override;
~ScreenGameplayReplay() override;
Expand Down
5 changes: 3 additions & 2 deletions src/Etterna/Screen/Others/ScreenSelectMusic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1234,8 +1234,9 @@ ScreenSelectMusic::SelectCurrent(PlayerNumber pn, GameplayMode mode)
// I believe this is for those who like pump pro. -aj
MESSAGEMAN->Broadcast("SongChosen");
break;
case SelectionState_SelectingSteps: {
} break;
case SelectionState_SelectingSteps:
default:
break;
}
if (m_SelectionState == SelectionState_SelectingSteps) {
if (m_OptionsList.IsOpened())
Expand Down
3 changes: 3 additions & 0 deletions src/Etterna/Singletons/NetworkSyncManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1281,6 +1281,9 @@ ETTProtocol::Update(NetworkSyncManager* n, float fDeltaTime)
}
MESSAGEMAN->Broadcast("UsersUpdate");
} break;
case ettps_end:
default:
break;
}
} catch (std::exception e) {
Locator::getLogger()->trace("Error while parsing ettp json message: {}", e.what());
Expand Down
4 changes: 2 additions & 2 deletions src/RageUtil/Graphics/RageDisplay_OGL.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ class RageDisplay_Legacy : public RageDisplay
void SetTextureFiltering(TextureUnit tu, bool b) override;
void SetEffectMode(EffectMode effect) override;
bool IsEffectModeSupported(EffectMode effect) override;
bool SupportsRenderToTexture() const;
bool SupportsFullscreenBorderlessWindow() const;
bool SupportsRenderToTexture() const override;
bool SupportsFullscreenBorderlessWindow() const override;
intptr_t CreateRenderTarget(const RenderTargetParam& param,
int& iTextureWidthOut,
int& iTextureHeightOut) override;
Expand Down
4 changes: 2 additions & 2 deletions src/RageUtil/Misc/RageMath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ struct sine_initter

static sine_initter sinner;

float
const float
RageFastSin(float angle)
{
if (angle == 0) {
Expand All @@ -841,7 +841,7 @@ RageFastSin(float angle)
return result;
}

float
const float
RageFastCos(float x)
{
return RageFastSin(x + 0.5f * PI);
Expand Down
4 changes: 2 additions & 2 deletions src/RageUtil/Misc/RageMath.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ void
RageMatrixTranspose(struct RageMatrix* pOut, const struct RageMatrix* pIn);

auto
RageFastSin(float x) -> float CONST_FUNCTION;
RageFastSin(float x) -> const float;
auto
RageFastCos(float x) -> float CONST_FUNCTION;
RageFastCos(float x) -> const float;

class RageQuadratic
{
Expand Down
18 changes: 9 additions & 9 deletions src/RageUtil/Sound/RageSoundReader_MP3.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,22 @@ fill_frame_index_cache(madlib_t* mad);
class RageSoundReader_MP3 : public RageSoundReader_FileReader
{
public:
OpenResult Open(RageFileBasic* pFile);
OpenResult Open(RageFileBasic* pFile) override;
void Close();
int GetLength() const { return GetLengthConst(false); }
int GetLength_Fast() const { return GetLengthConst(true); }
int SetPosition(int iSample);
int Read(float* pBuf, int iFrames);
unsigned GetNumChannels() const { return Channels; }
int GetSampleRate() const { return SampleRate; }
int GetNextSourceFrame() const;
int GetLength() const override { return GetLengthConst(false); }
int GetLength_Fast() const override { return GetLengthConst(true); }
int SetPosition(int iSample) override;
int Read(float* pBuf, int iFrames) override;
unsigned GetNumChannels() const override { return Channels; }
int GetSampleRate() const override { return SampleRate; }
int GetNextSourceFrame() const override;
bool SetProperty(const std::string& sProperty, float fValue) override;

RageSoundReader_MP3();
~RageSoundReader_MP3();
RageSoundReader_MP3(
const RageSoundReader_MP3&); /* not defined; don't use */
RageSoundReader_MP3* Copy() const;
RageSoundReader_MP3* Copy() const override;

private:
int SampleRate;
Expand Down
3 changes: 3 additions & 0 deletions src/arch/Sound/RageSoundDriver_PulseAudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ RageSoundDriver_PulseAudio::CtxStateCb(pa_context* c)
m_Sem.Post();
return;
break;
case PA_CONTEXT_UNCONNECTED:
default:
break;
}
}

Expand Down

0 comments on commit 75ec3f8

Please sign in to comment.