From 640ceea16c0878c200a1db96f242c1dd74d0596f Mon Sep 17 00:00:00 2001 From: Nicolas Date: Tue, 3 Apr 2018 04:42:55 -0300 Subject: [PATCH] clang-tidy changes --- src/BitmapText.h | 2 +- src/DownloadManager.cpp | 15 ++++++--------- src/GameCommand.cpp | 1 - src/GameState.cpp | 1 - src/LifeMeterBar.cpp | 1 - src/LifeMeterBar.h | 1 - src/MenuTimer.cpp | 2 +- src/MusicWheel.cpp | 12 ++++++------ src/MusicWheelItem.cpp | 5 ----- src/NoteDataWithScoring.cpp | 5 ----- src/NoteField.cpp | 1 - src/Player.cpp | 17 ----------------- src/PlayerState.cpp | 1 - src/RageDisplay_D3D.cpp | 4 ++-- src/RageDisplay_D3D.h | 2 +- src/RageDisplay_OGL.cpp | 2 -- src/RageFileDriverTimeout.h | 1 - src/RageSurface_Save_PNG.cpp | 1 - src/RageUtil_BackgroundLoader.h | 2 -- src/ScreenEvaluation.cpp | 2 -- src/ScreenGameplay.cpp | 1 - src/ScreenManager.h | 2 -- src/Song.cpp | 1 - src/SongUtil.cpp | 1 - src/StageStats.cpp | 2 -- src/StreamDisplay.cpp | 1 - src/TimingData.cpp | 3 --- src/arch/MovieTexture/MovieTexture_Generic.h | 1 - src/arch/MovieTexture/MovieTexture_Null.cpp | 1 - src/archutils/Win32/Crash.cpp | 2 -- src/archutils/Win32/CrashHandlerChild.cpp | 1 - 31 files changed, 17 insertions(+), 77 deletions(-) diff --git a/src/BitmapText.h b/src/BitmapText.h index dc83c4c2df..f8d7ad4304 100644 --- a/src/BitmapText.h +++ b/src/BitmapText.h @@ -152,7 +152,7 @@ class BitmapText : public Actor class ColorBitmapText : public BitmapText { public: - ColorBitmapText * Copy() const; + ColorBitmapText * Copy() const override; void SetText(const RString &sText, const RString &sAlternateText = "", int iWrapWidthPixels = -1) override; void ResetText(); void DrawPrimitives() override; diff --git a/src/DownloadManager.cpp b/src/DownloadManager.cpp index cfe5c2f06b..42cfbf715c 100644 --- a/src/DownloadManager.cpp +++ b/src/DownloadManager.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "global.h" #if !defined(WITHOUT_NETWORKING) #include "RageFileManager.h" @@ -399,7 +397,7 @@ void DownloadManager::UpdateHTTP(float fDeltaSeconds) mc = curl_multi_fdset(mHTTPHandle, &fdread, &fdwrite, &fdexcep, &maxfd); if (mc != CURLM_OK) { - error = "curl_multi_fdset() failed, code " + mc; + error = "curl_multi_fdset() failed, code " + to_string(mc); return; } if (maxfd == -1) { @@ -410,7 +408,7 @@ void DownloadManager::UpdateHTTP(float fDeltaSeconds) } switch (rc) { case -1: - error = "select error" + mc; + error = "select error" + to_string(mc); break; case 0: /* timeout */ default: /* action */ @@ -421,7 +419,7 @@ void DownloadManager::UpdateHTTP(float fDeltaSeconds) //Check for finished downloads CURLMsg *msg; int msgs_left; - while (msg = curl_multi_info_read(mHTTPHandle, &msgs_left)) { + while ((msg = curl_multi_info_read(mHTTPHandle, &msgs_left))) { /* Find out which handle this message is about */ for (int i = 0; i < HTTPRequests.size();++i) { if (msg->easy_handle == HTTPRequests[i]->handle) { @@ -477,7 +475,7 @@ void DownloadManager::UpdatePacks(float fDeltaSeconds) mc = curl_multi_fdset(mPackHandle, &fdread, &fdwrite, &fdexcep, &maxfd); if (mc != CURLM_OK) { - error = "curl_multi_fdset() failed, code " + mc; + error = "curl_multi_fdset() failed, code " + to_string(mc); return; } if (maxfd == -1) { @@ -488,7 +486,7 @@ void DownloadManager::UpdatePacks(float fDeltaSeconds) } switch (rc) { case -1: - error = "select error" + mc; + error = "select error" + to_string(mc); break; case 0: /* timeout */ default: /* action */ @@ -503,7 +501,7 @@ void DownloadManager::UpdatePacks(float fDeltaSeconds) int msgs_left; bool installedPacks = false; bool finishedADownload = false; - while (msg = curl_multi_info_read(mPackHandle, &msgs_left)) { + while ((msg = curl_multi_info_read(mPackHandle, &msgs_left))) { /* Find out which handle this message is about */ for (auto i = downloads.begin(); i != downloads.end(); i++) { if (msg->easy_handle == i->second->handle) { @@ -619,7 +617,6 @@ void DownloadManager::UploadScoreWithReplayData(HighScore* hs) string url = serverURL.Get() + "/upload_score"; curl_httppost *form = nullptr; curl_httppost *lastPtr = nullptr; - curl_slist *headerlist = nullptr; SetCURLPOSTScore(curlHandle, form, lastPtr, hs); string replayString; vector offsets = hs->GetOffsetVector(); diff --git a/src/GameCommand.cpp b/src/GameCommand.cpp index a696dc75fd..c255b9d884 100644 --- a/src/GameCommand.cpp +++ b/src/GameCommand.cpp @@ -480,7 +480,6 @@ void GameCommand::Apply( const vector &vpns ) const void GameCommand::ApplySelf( const vector &vpns ) const { - const PlayMode OldPlayMode = GAMESTATE->m_PlayMode; if( m_pm != PlayMode_Invalid ) GAMESTATE->m_PlayMode.Set( m_pm ); diff --git a/src/GameState.cpp b/src/GameState.cpp index 7277bd6fd5..5e288448ee 100644 --- a/src/GameState.cpp +++ b/src/GameState.cpp @@ -671,7 +671,6 @@ void GameState::CommitStageStats() void GameState::FinishStage() { // Increment the stage counter. - const int iOldStageIndex = m_iCurrentStageIndex; ++m_iCurrentStageIndex; m_iNumStagesOfThisSong = 0; diff --git a/src/LifeMeterBar.cpp b/src/LifeMeterBar.cpp index 22f2aec967..9929e8f895 100644 --- a/src/LifeMeterBar.cpp +++ b/src/LifeMeterBar.cpp @@ -82,7 +82,6 @@ void LifeMeterBar::Load( const PlayerState *pPlayerState, PlayerStageStats *pPla { LifeMeter::Load( pPlayerState, pPlayerStageStats ); - PlayerNumber pn = pPlayerState->m_PlayerNumber; DrainType dtype = pPlayerState->m_PlayerOptions.GetStage().m_DrainType; switch( dtype ) diff --git a/src/LifeMeterBar.h b/src/LifeMeterBar.h index fe4c1160e9..f29224c2d4 100644 --- a/src/LifeMeterBar.h +++ b/src/LifeMeterBar.h @@ -67,7 +67,6 @@ class LifeMeterBar : public LifeMeter float m_fPassingAlpha; float m_fHotAlpha; - bool m_bMercifulBeginnerInEffect; float m_fBaseLifeDifficulty; float m_fLifeDifficulty; // essentially same as pref diff --git a/src/MenuTimer.cpp b/src/MenuTimer.cpp index 2ec3cbb6aa..d5538435cf 100644 --- a/src/MenuTimer.cpp +++ b/src/MenuTimer.cpp @@ -182,7 +182,7 @@ void MenuTimer::SetText( float fSeconds ) LuaHelpers::Push( L, fSeconds ); // call function with 1 argument and 1 result - RString Error= "Error running Text" + (i+1); + RString Error= "Error running Text " + to_string(i+1); Error+= "FormatFunction: "; LuaHelpers::RunScriptOnStack(L, Error, 1, 1, true); diff --git a/src/MusicWheel.cpp b/src/MusicWheel.cpp index 56b8e0a8ec..4ac5e7e09c 100644 --- a/src/MusicWheel.cpp +++ b/src/MusicWheel.cpp @@ -438,16 +438,16 @@ void MusicWheel::FilterBySearch(vector& inv, RString findme) { else { if (findauthor == "") { if (findtitle == "") - check = [&findauthor, &findartist, &findtitle](Song* x) { + check = [&findartist](Song* x) { return contains(x->GetDisplayArtist(), findartist); }; else { if (findartist == "") - check = [&findauthor, &findartist, &findtitle](Song* x) { + check = [&findtitle](Song* x) { return contains(x->GetDisplayMainTitle(), findtitle); }; else - check = [&findauthor, &findartist, &findtitle](Song* x) { + check = [&findartist, &findtitle](Song* x) { return contains(x->GetDisplayArtist(), findartist) || contains(x->GetDisplayMainTitle(), findtitle); }; @@ -456,17 +456,17 @@ void MusicWheel::FilterBySearch(vector& inv, RString findme) { else { if (findtitle == "") { if (findartist == "") - check = [&findauthor, &findartist, &findtitle](Song* x) { + check = [&findauthor](Song* x) { return contains(x->GetOrTryAtLeastToGetSimfileAuthor(), findauthor); }; else - check = [&findauthor, &findartist, &findtitle](Song* x) { + check = [&findauthor, &findartist](Song* x) { return contains(x->GetDisplayArtist(), findartist) || contains(x->GetOrTryAtLeastToGetSimfileAuthor(), findauthor); }; } else { - check = [&findauthor, &findartist, &findtitle](Song* x) { + check = [&findauthor, &findtitle](Song* x) { return contains(x->GetDisplayMainTitle(), findtitle) || contains(x->GetOrTryAtLeastToGetSimfileAuthor(), findauthor); }; diff --git a/src/MusicWheelItem.cpp b/src/MusicWheelItem.cpp index bf1da2e77e..2e6db02b5f 100644 --- a/src/MusicWheelItem.cpp +++ b/src/MusicWheelItem.cpp @@ -322,10 +322,6 @@ void MusicWheelItem::RefreshGrades() m_pGradeDisplay[p]->SetVisible( true ); - - Profile *pProfile = PROFILEMAN->GetProfile(ps); - - HighScoreList *pHSL = NULL; HighScoreList *BestpHSL = NULL; Grade gradeBest = Grade_Invalid; Difficulty dcBest = Difficulty_Invalid; @@ -380,7 +376,6 @@ void MusicWheelItem::RefreshGrades() void MusicWheelItem::HandleMessage( const Message &msg ) { - static const bool iskyzagoodprogrammer = false; WheelItemBase::HandleMessage( msg ); } diff --git a/src/NoteDataWithScoring.cpp b/src/NoteDataWithScoring.cpp index d920c1765e..033355af38 100644 --- a/src/NoteDataWithScoring.cpp +++ b/src/NoteDataWithScoring.cpp @@ -350,11 +350,6 @@ void NoteDataWithScoring::GetActualRadarValues(const NoteData &in, // ScreenGameplay passes in the RadarValues that were calculated by // NoteDataUtil::CalculateRadarValues, so those are reused here. -Kyz - int note_count= out[RadarCategory_Notes]; - int jump_count= out[RadarCategory_Jumps]; - int hold_count= out[RadarCategory_Holds]; - int tap_count= out[RadarCategory_TapsAndHolds]; - float hittable_steps_length= max(0, timing->WhereUAtBro(last_hittable_row) - timing->WhereUAtBro(first_hittable_row)); // The for loop and the assert are used to ensure that all fields of // RadarValue get set in here. FOREACH_ENUM(RadarCategory, rc) diff --git a/src/NoteField.cpp b/src/NoteField.cpp index 553e22d326..b9aa7a4ffc 100644 --- a/src/NoteField.cpp +++ b/src/NoteField.cpp @@ -788,7 +788,6 @@ void NoteField::DrawPrimitives() { ASSERT(GAMESTATE->m_pCurSong != NULL); - const TimingData &timing = *pTiming; const RageColor text_glow= RageColor(1,1,1,RageFastCos(RageTimer::GetTimeSinceStartFast()*2)/2+0.5f); float horiz_align= align_right; diff --git a/src/Player.cpp b/src/Player.cpp index d125826f0e..7ec1505acc 100644 --- a/src/Player.cpp +++ b/src/Player.cpp @@ -623,7 +623,6 @@ void Player::Load() if (!m_Timing->ValidSequentialAssumption) m_pPlayerStageStats->luascriptwasloaded = true; - Profile *pProfile = PROFILEMAN->GetProfile(pn); const HighScore* pb = SCOREMAN->GetChartPBAt(GAMESTATE->m_pCurSteps[pn]->GetChartKey(), GAMESTATE->m_SongOptions.GetCurrent().m_fMusicRate); if (pb != nullptr) wifescorepersonalbest = pb->GetWifeScore(); @@ -652,7 +651,6 @@ void Player::Load() m_pNoteField->Load( &m_NoteData, iDrawDistanceAfterTargetsPixels, iDrawDistanceBeforeTargetsPixels ); } - bool bPlayerUsingBothSides = GAMESTATE->GetCurrentStyle(GetPlayerState()->m_PlayerNumber)->GetUsesCenteredArrows(); // set this in Update //m_pJudgment->SetX( JUDGMENT_X.GetValue(pn,bPlayerUsingBothSides) ); @@ -1507,7 +1505,6 @@ void Player::DrawHoldJudgments() void Player::ChangeLife( TapNoteScore tns ) { - PlayerNumber pn = m_pPlayerState->m_PlayerNumber; if( m_pLifeMeter != nullptr ) m_pLifeMeter->ChangeLife( tns ); @@ -1516,7 +1513,6 @@ void Player::ChangeLife( TapNoteScore tns ) void Player::ChangeLife( HoldNoteScore hns, TapNoteScore tns ) { - PlayerNumber pn = m_pPlayerState->m_PlayerNumber; if( m_pLifeMeter != nullptr ) m_pLifeMeter->ChangeLife( hns, tns ); @@ -1530,7 +1526,6 @@ void Player::ChangeLife(float delta) // change) to the time of this change, instead of the sharp change that // actually occurred. -Kyz ChangeLifeRecord(); - PlayerNumber pn = m_pPlayerState->m_PlayerNumber; if(m_pLifeMeter != nullptr) { m_pLifeMeter->ChangeLife(delta); @@ -1545,7 +1540,6 @@ void Player::SetLife(float value) // change) to the time of this change, instead of the sharp change that // actually occurred. -Kyz ChangeLifeRecord(); - PlayerNumber pn = m_pPlayerState->m_PlayerNumber; if(m_pLifeMeter != nullptr) { m_pLifeMeter->SetLife(value); @@ -1555,7 +1549,6 @@ void Player::SetLife(float value) void Player::ChangeLifeRecord() { - PlayerNumber pn = m_pPlayerState->m_PlayerNumber; float fLife = -1; if( m_pLifeMeter != nullptr ) { @@ -1620,8 +1613,6 @@ int Player::GetClosestNote( int col, int iNoteRow, int iMaxRowsAhead, int iMaxRo if( iPrevIndex == -1 ) return iNextIndex; - PlayerNumber pn = m_pPlayerState->m_PlayerNumber; - // Get the current time, previous time, and next time. float fNoteTime = m_pPlayerState->m_Position.m_fMusicSeconds; float fNextTime = m_Timing->WhereUAtBro(iNextIndex); @@ -1676,8 +1667,6 @@ int Player::GetClosestNonEmptyRowDirectional( int iStartRow, int iEndRow, bool / // Find the closest note to fBeat. int Player::GetClosestNonEmptyRow( int iNoteRow, int iMaxRowsAhead, int iMaxRowsBehind, bool bAllowGraded ) const { - PlayerNumber pn = m_pPlayerState->m_PlayerNumber; - // Start at iIndexStartLookingAt and search outward. int iNextRow = GetClosestNonEmptyRowDirectional( iNoteRow, iNoteRow+iMaxRowsAhead, bAllowGraded, true ); int iPrevRow = GetClosestNonEmptyRowDirectional( iNoteRow-iMaxRowsBehind, iNoteRow, bAllowGraded, false ); @@ -1726,8 +1715,6 @@ void Player::DoTapScoreNone() if( m_pLifeMeter != nullptr ) m_pLifeMeter->HandleTapScoreNone(); - // TODO: Remove use of PlayerNumber - PlayerNumber pn = PLAYER_INVALID; if( PENALIZE_TAP_SCORE_NONE ) { @@ -1803,9 +1790,6 @@ void Player::Step( int col, int row, const std::chrono::steady_clock::time_point if( IsOniDead() ) return; - // TODO: remove use of PlayerNumber - PlayerNumber pn = m_pPlayerState->m_PlayerNumber; - // Do everything that depends on a timer here; // set your breakpoints somewhere after this block. std::chrono::duration stepDelta = std::chrono::steady_clock::now() - tm; @@ -1980,7 +1964,6 @@ void Player::Step( int col, int row, const std::chrono::steady_clock::time_point const float fSecondsFromExact = fabsf( fNoteOffset ); - TapNote tnDummy = TAP_ORIGINAL_TAP; TapNote *pTN = NULL; NoteData::iterator iter = m_NoteData.FindTapNote( col, iRowOfOverlappingNoteOrRow ); DEBUG_ASSERT( iter!= m_NoteData.end(col) ); diff --git a/src/PlayerState.cpp b/src/PlayerState.cpp index 5e8d56a027..0e248b9652 100644 --- a/src/PlayerState.cpp +++ b/src/PlayerState.cpp @@ -32,7 +32,6 @@ void PlayerState::Update( float fDelta ) // TRICKY: GAMESTATE->Update is run before any of the Screen update's, // so we'll clear these flags here and let them get turned on later - bool bRebuildPlayerOptions = false; // Update after enabling attacks, so we approach the new state. m_PlayerOptions.Update( fDelta ); diff --git a/src/RageDisplay_D3D.cpp b/src/RageDisplay_D3D.cpp index 525b175cff..a9c89571a8 100644 --- a/src/RageDisplay_D3D.cpp +++ b/src/RageDisplay_D3D.cpp @@ -802,12 +802,12 @@ void RageDisplay_D3D::SendCurrentMatrices() class RageCompiledGeometrySWD3D : public RageCompiledGeometry { public: - void Allocate( const vector &vMeshes ) + void Allocate( const vector &vMeshes ) override { m_vVertex.resize( max(1u, GetTotalVertices()) ); m_vTriangles.resize( max(1u, GetTotalTriangles()) ); } - void Change( const vector &vMeshes ) + void Change( const vector &vMeshes ) override { for( unsigned i=0; ifmt.Amask != 0; RageSurface *pImg; bool bDeleteImg = RageSurfaceUtils::ConvertSurface( pImgIn, pImg, pImgIn->w, pImgIn->h, 32, Swap32BE( 0xFF000000 ), diff --git a/src/RageUtil_BackgroundLoader.h b/src/RageUtil_BackgroundLoader.h index f52d96d515..415fd26f8c 100644 --- a/src/RageUtil_BackgroundLoader.h +++ b/src/RageUtil_BackgroundLoader.h @@ -54,8 +54,6 @@ class BackgroundLoader bool m_sThreadIsActive; bool m_sThreadShouldAbort; - - RageFileDriverCached *m_pDriver; }; #endif diff --git a/src/ScreenEvaluation.cpp b/src/ScreenEvaluation.cpp index 8fa7d7d3d3..02739ba81c 100644 --- a/src/ScreenEvaluation.cpp +++ b/src/ScreenEvaluation.cpp @@ -743,8 +743,6 @@ bool ScreenEvaluation::MenuStart( const InputEventPlus &input ) void ScreenEvaluation::HandleMenuStart() { - Profile *prof = PROFILEMAN->GetProfile( static_cast(0) ); - HighScore * hs = &(m_pStageStats->m_player[0].m_HighScore); StepsID stepsid; stepsid.FromSteps(GAMESTATE->m_pCurSteps[PLAYER_1]); SongID songid; diff --git a/src/ScreenGameplay.cpp b/src/ScreenGameplay.cpp index 188c5b8c3c..9fe12f245e 100644 --- a/src/ScreenGameplay.cpp +++ b/src/ScreenGameplay.cpp @@ -775,7 +775,6 @@ void ScreenGameplay::InitSongQueues() { Steps *pSteps = GAMESTATE->m_pCurSteps[pi->GetStepsAndTrailIndex()]; pi->m_vpStepsQueue.push_back(pSteps); - const PlayerOptions &p = pi->GetPlayerState()->m_PlayerOptions.GetCurrent(); } if (GAMESTATE->IsPlaylistCourse()) { diff --git a/src/ScreenManager.h b/src/ScreenManager.h index 47f8201d14..4ba02e9727 100644 --- a/src/ScreenManager.h +++ b/src/ScreenManager.h @@ -74,8 +74,6 @@ class ScreenManager void PlaySharedBackgroundOffCommand(); void ZeroNextUpdate(); private: - Screen *m_pInputFocus; // NULL = top of m_ScreenStack - // Screen loads, removals, and concurrent prepares are delayed until the next update. RString m_sDelayedScreen; RString m_sDelayedConcurrentPrepare; diff --git a/src/Song.cpp b/src/Song.cpp index e68fcc93a4..6c2290f244 100644 --- a/src/Song.cpp +++ b/src/Song.cpp @@ -1685,7 +1685,6 @@ float Song::GetHighestOfSkillsetAllSteps(int x, float rate) const { } bool Song::IsSkillsetHighestOfAnySteps(Skillset ss, float rate) { - float o = 0.f; vector vsteps = GetAllSteps(); FOREACH(Steps*, vsteps, steps) { auto sortedstuffs = (*steps)->SortSkillsetsAtRate(rate, true); diff --git a/src/SongUtil.cpp b/src/SongUtil.cpp index 75675f35ca..6371941acc 100644 --- a/src/SongUtil.cpp +++ b/src/SongUtil.cpp @@ -246,7 +246,6 @@ void SongUtil::AdjustDuplicateSteps( Song *pSong ) * bug in an earlier version. */ DeleteDuplicateSteps( pSong, vSteps ); - char const *songTitle = pSong->GetDisplayFullTitle().c_str(); RString checkpointMessage = pSong->GetDisplayFullTitle() + " had duplicate steps removed."; CHECKPOINT_M(checkpointMessage); StepsUtil::SortNotesArrayByDifficulty( vSteps ); diff --git a/src/StageStats.cpp b/src/StageStats.cpp index b20cf5f54e..95d4e4ed3b 100644 --- a/src/StageStats.cpp +++ b/src/StageStats.cpp @@ -586,9 +586,7 @@ void StageStats::FinalizeScores(bool bSummary) } HighScore &hs = m_player[PLAYER_1].m_HighScore; - StepsType st = GAMESTATE->GetCurrentStyle(PLAYER_1)->m_StepsType; - const Song* pSong = GAMESTATE->m_pCurSong; const Steps* pSteps = GAMESTATE->m_pCurSteps[PLAYER_1]; ASSERT(pSteps != NULL); diff --git a/src/StreamDisplay.cpp b/src/StreamDisplay.cpp index 4af4c89046..b694bbddc6 100644 --- a/src/StreamDisplay.cpp +++ b/src/StreamDisplay.cpp @@ -84,7 +84,6 @@ void StreamDisplay::Update( float fDeltaSecs ) m_fTrailingPercent += m_fVelocity * fDeltaSecs; // set crop of pills - const float fPillWidthPercent = 1.0f / m_vpSprPill[0].size(); FOREACH_ENUM( StreamType, st ) { for( int i=0; i<(int)m_vpSprPill[st].size(); i++ ) diff --git a/src/TimingData.cpp b/src/TimingData.cpp index f848ea8b1b..90d0a000f3 100644 --- a/src/TimingData.cpp +++ b/src/TimingData.cpp @@ -110,7 +110,6 @@ void TimingData::PrepareLookup() GetBeatStarts time_start; time_start.last_time= -m_fBeat0OffsetInSeconds; - float time= GetElapsedTimeInternal(time_start, FLT_MAX, curr_segment); m_time_start_lookup.push_back(lookup_item_t(NoteRowToBeat(time_start.last_row), time_start)); } // If there are less than two entries, then FindEntryInLookup in lookup @@ -1442,7 +1441,6 @@ const vector& TimingData::BuildAndGetEtaner(const vector& nerv) { // handle simple single bpm case if applicable -mina if (bpms.size() == 1) { - float last_time = 0.f; float bps = GetBPMAtRow(0) / 60.f; for (auto& n : nerv) { ElapsedTimesAtNonEmptyRows.emplace_back(NoteRowToBeat(n) / bps - m_fBeat0OffsetInSeconds); @@ -1505,7 +1503,6 @@ const vector& TimingData::BuildAndGetEtar(int lastrow) { // handle single bpm case if applicable -mina if (bpms.size() == 1) { - float last_time = 0.f; float bps = GetBPMAtRow(0) / 60.0f; for (int i = 0; i < lastrow; ++i) { ElapsedTimesAtAllRows.emplace_back(NoteRowToBeat(i) / bps - m_fBeat0OffsetInSeconds); diff --git a/src/arch/MovieTexture/MovieTexture_Generic.h b/src/arch/MovieTexture/MovieTexture_Generic.h index de9f7cf4b3..00a91a3a64 100644 --- a/src/arch/MovieTexture/MovieTexture_Generic.h +++ b/src/arch/MovieTexture/MovieTexture_Generic.h @@ -108,7 +108,6 @@ class MovieTexture_Generic: public RageMovieTexture bool m_bLoop; bool m_bWantRewind; - enum State { DECODER_QUIT, DECODER_RUNNING } m_State; unsigned m_uTexHandle; RageTextureRenderTarget *m_pRenderTarget; diff --git a/src/arch/MovieTexture/MovieTexture_Null.cpp b/src/arch/MovieTexture/MovieTexture_Null.cpp index 979aa73477..4a0e1a34e1 100644 --- a/src/arch/MovieTexture/MovieTexture_Null.cpp +++ b/src/arch/MovieTexture/MovieTexture_Null.cpp @@ -19,7 +19,6 @@ class MovieTexture_Null : public RageMovieTexture { void SetLooping(bool looping=true) { loop = looping; } private: - bool playing; bool loop; unsigned texHandle; }; diff --git a/src/archutils/Win32/Crash.cpp b/src/archutils/Win32/Crash.cpp index ea2c0be0dd..ea9b2d462a 100644 --- a/src/archutils/Win32/Crash.cpp +++ b/src/archutils/Win32/Crash.cpp @@ -592,7 +592,6 @@ void CrashHandler::ForceDeadlock( const RString &reason, uint64_t iID ) "; GetThreadContext(%x) failed", (int) hThread ); else { - static const void *BacktracePointers[BACKTRACE_MAX_SIZE]; do_backtrace( g_CrashInfo.m_AlternateThreadBacktrace[iCnt], BACKTRACE_MAX_SIZE, GetCurrentProcess(), hThread, &context ); const char *pName = RageThread::GetThreadNameByID( iID ); @@ -613,7 +612,6 @@ void CrashHandler::ForceDeadlock( const RString &reason, uint64_t iID ) strcat( g_CrashInfo.m_CrashReason, "(GetThreadContext failed)" ); else { - static const void *BacktracePointers[BACKTRACE_MAX_SIZE]; do_backtrace( g_CrashInfo.m_AlternateThreadBacktrace[0], BACKTRACE_MAX_SIZE, GetCurrentProcess(), hThread, &context ); const char *pName = RageThread::GetThreadNameByID( iID ); diff --git a/src/archutils/Win32/CrashHandlerChild.cpp b/src/archutils/Win32/CrashHandlerChild.cpp index cd94223006..bf526ab7ec 100644 --- a/src/archutils/Win32/CrashHandlerChild.cpp +++ b/src/archutils/Win32/CrashHandlerChild.cpp @@ -452,7 +452,6 @@ static void MakeCrashReport( const CompleteCrashData &Data, RString &sOut ) sOut += ssprintf( "\n" ); // Dump thread stacks - static char buf[1024*32]; sOut += ssprintf( "%s\n", join("\n", Data.m_asCheckpoints).c_str() ); sOut += ReportCallStack( Data.m_CrashInfo.m_BacktracePointers );