diff --git a/src/Etterna/Actor/Base/Actor.cpp b/src/Etterna/Actor/Base/Actor.cpp index f4ca72a1db..b28b5ea186 100644 --- a/src/Etterna/Actor/Base/Actor.cpp +++ b/src/Etterna/Actor/Base/Actor.cpp @@ -974,10 +974,9 @@ Actor::UpdateInternal(float delta_time) } break; case CLOCK_TIMER_GLOBAL: - generic_global_timer_update( - RageTimer::GetTimeSinceStart(), - m_fEffectDelta, - m_fSecsIntoEffect); + generic_global_timer_update(RageTimer::GetTimeSinceStart(), + m_fEffectDelta, + m_fSecsIntoEffect); break; case CLOCK_BGM_BEAT: generic_global_timer_update( diff --git a/src/Etterna/Actor/Base/ActorMultiVertex.cpp b/src/Etterna/Actor/Base/ActorMultiVertex.cpp index ffc1b38d53..28a0d7ec24 100644 --- a/src/Etterna/Actor/Base/ActorMultiVertex.cpp +++ b/src/Etterna/Actor/Base/ActorMultiVertex.cpp @@ -387,7 +387,7 @@ ActorMultiVertex::GetSpline(size_t i) } void -ActorMultiVertex::SetState(size_t i) +ActorMultiVertex::SetState(int i) { ASSERT(i < _states.size()); _cur_state = i; diff --git a/src/Etterna/Actor/Base/ActorMultiVertex.h b/src/Etterna/Actor/Base/ActorMultiVertex.h index 8612c4dda0..7bc0c0dc52 100644 --- a/src/Etterna/Actor/Base/ActorMultiVertex.h +++ b/src/Etterna/Actor/Base/ActorMultiVertex.h @@ -177,7 +177,7 @@ class ActorMultiVertex : public Actor _states = new_states; SetState(0); } - void SetState(size_t i); + void SetState(int i) override; void SetAllStateDelays(float delay); [[nodiscard]] float GetAnimationLengthSeconds() const override; void SetSecondsIntoAnimation(float seconds) override; diff --git a/src/Etterna/Actor/Gameplay/Background.cpp b/src/Etterna/Actor/Gameplay/Background.cpp index ce39f96afb..69ca7e04c9 100644 --- a/src/Etterna/Actor/Gameplay/Background.cpp +++ b/src/Etterna/Actor/Gameplay/Background.cpp @@ -50,9 +50,6 @@ static Preference g_RandomBackgroundMode( static Preference g_iNumBackgrounds("NumBackgrounds", 10); static Preference g_bSongBackgrounds("SongBackgrounds", true); -// Width of the region separating the left and right brightness areas: -static float g_fBackgroundCenterWidth = 40; - class BrightnessOverlay : public ActorFrame { public: diff --git a/src/Etterna/Actor/Gameplay/NoteDisplay.cpp b/src/Etterna/Actor/Gameplay/NoteDisplay.cpp index 09250ac2d9..b3dc171ede 100644 --- a/src/Etterna/Actor/Gameplay/NoteDisplay.cpp +++ b/src/Etterna/Actor/Gameplay/NoteDisplay.cpp @@ -21,7 +21,6 @@ using std::map; -static const double PI_180 = PI / 180.0; static const double PI_180R = 180.0 / PI; const std::string& @@ -1900,7 +1899,6 @@ NoteColumnRenderer::DrawPrimitives() m_column_render_args.zoom_handler = &NCR_current.m_zoom_handler; m_column_render_args.diffuse = m_pTempState->diffuse[0]; m_column_render_args.glow = m_pTempState->glow; - auto any_upcoming = false; // Build lists of holds and taps for each player number, then pass those // lists to the displays to draw. // The vector in the NUM_PlayerNumber slot should stay empty, not worth @@ -1941,11 +1939,11 @@ NoteColumnRenderer::DrawPrimitives() // Draw holds before taps to make sure taps dont hide behind holds if (!holds.empty()) - any_upcoming |= m_displays[PLAYER_1]->DrawHoldsInRange( + m_displays[PLAYER_1]->DrawHoldsInRange( *m_field_render_args, m_column_render_args, holds); if (!taps.empty()) - any_upcoming |= m_displays[PLAYER_1]->DrawTapsInRange( + m_displays[PLAYER_1]->DrawTapsInRange( *m_field_render_args, m_column_render_args, taps); } diff --git a/src/Etterna/Actor/Gameplay/Player.cpp b/src/Etterna/Actor/Gameplay/Player.cpp index 30db1f8d7a..7cb39b1a78 100644 --- a/src/Etterna/Actor/Gameplay/Player.cpp +++ b/src/Etterna/Actor/Gameplay/Player.cpp @@ -894,7 +894,6 @@ Player::UpdateHoldsAndRolls(float fDeltaTime, } std::vector vHoldNotesToGradeTogether; - auto iRowOfLastHoldNote = -1; auto iter = *m_pIterNeedsHoldJudging; // copy for (; !iter.IsAtEnd() && iter.Row() <= iSongRow; ++iter) { auto& tn = *iter; @@ -933,7 +932,6 @@ Player::UpdateHoldsAndRolls(float fDeltaTime, iSongRow, fDeltaTime, vHoldNotesToGradeTogether); vHoldNotesToGradeTogether.clear(); } - iRowOfLastHoldNote = iRow; vHoldNotesToGradeTogether.push_back(trtn); } @@ -2214,8 +2212,8 @@ Player::Step(int col, // TapNoteScore, so that they can logically match up with // the current timing windows. -aj { - auto fWindowW1 = GetWindowSeconds(TW_W1); - auto fWindowW2 = GetWindowSeconds(TW_W2); + // auto fWindowW1 = GetWindowSeconds(TW_W1); + // auto fWindowW2 = GetWindowSeconds(TW_W2); auto fWindowW3 = GetWindowSeconds(TW_W3); auto fWindowW4 = GetWindowSeconds(TW_W4); auto fWindowW5 = GetWindowSeconds(TW_W5); @@ -2372,8 +2370,6 @@ Player::FlashGhostRow(int iRow) { const auto lastTNS = NoteDataWithScoring::LastTapNoteWithResult(m_NoteData, iRow).result.tns; - const auto bBlind = - (m_pPlayerState->m_PlayerOptions.GetCurrent().m_fBlind != 0); const auto bBright = ((m_pPlayerStageStats != nullptr) && m_pPlayerStageStats->m_iCurCombo > @@ -3366,9 +3362,6 @@ Player::IncrementComboOrMissCombo(const bool bComboOrMissCombo) void Player::RenderAllNotesIgnoreScores() { - auto firstRow = 0; - auto lastRow = m_NoteData.GetLastRow() + 1; - // Go over every single non empty row and their tracks FOREACH_NONEMPTY_ROW_ALL_TRACKS(m_NoteData, row) { diff --git a/src/Etterna/Actor/Gameplay/PlayerReplay.cpp b/src/Etterna/Actor/Gameplay/PlayerReplay.cpp index 4bfe6f018a..486954100d 100644 --- a/src/Etterna/Actor/Gameplay/PlayerReplay.cpp +++ b/src/Etterna/Actor/Gameplay/PlayerReplay.cpp @@ -195,7 +195,6 @@ PlayerReplay::UpdateHoldsAndRolls( } std::vector vHoldNotesToGradeTogether; - auto iRowOfLastHoldNote = -1; auto iter = *m_pIterNeedsHoldJudging; // copy for (; !iter.IsAtEnd() && iter.Row() <= iSongRow; ++iter) { auto& tn = *iter; @@ -228,7 +227,6 @@ PlayerReplay::UpdateHoldsAndRolls( iSongRow, fDeltaTime, vHoldNotesToGradeTogether); vHoldNotesToGradeTogether.clear(); } - iRowOfLastHoldNote = iRow; vHoldNotesToGradeTogether.push_back(trtn); } diff --git a/src/Etterna/Actor/GameplayAndMenus/MeterDisplay.h b/src/Etterna/Actor/GameplayAndMenus/MeterDisplay.h index 5eae23078a..8efbfe3d79 100644 --- a/src/Etterna/Actor/GameplayAndMenus/MeterDisplay.h +++ b/src/Etterna/Actor/GameplayAndMenus/MeterDisplay.h @@ -24,7 +24,6 @@ class MeterDisplay : public ActorFrame private: float m_fStreamWidth = 0.f; - float m_fPercent = 0.5f; AutoActor m_sprStream; AutoActor m_sprTip; }; diff --git a/src/Etterna/Actor/Menus/ModIconRow.cpp b/src/Etterna/Actor/Menus/ModIconRow.cpp index c62c2dbbab..9001157bcd 100644 --- a/src/Etterna/Actor/Menus/ModIconRow.cpp +++ b/src/Etterna/Actor/Menus/ModIconRow.cpp @@ -135,8 +135,6 @@ OptionToPreferredColumn(std::string sOptionText) void ModIconRow::SetFromGameState() { - PlayerNumber pn = m_pn; - std::string sOptions = GAMESTATE->m_pPlayerState->m_PlayerOptions.GetStage().GetString(); std::vector vsOptions; diff --git a/src/Etterna/Actor/Menus/MusicWheel.cpp b/src/Etterna/Actor/Menus/MusicWheel.cpp index 1ad967b2a6..0b93719dbe 100644 --- a/src/Etterna/Actor/Menus/MusicWheel.cpp +++ b/src/Etterna/Actor/Menus/MusicWheel.cpp @@ -683,7 +683,7 @@ MusicWheel::FilterByAndAgainstStepKeys(std::vector& inv) { std::vector tmp; const std::function&)> check = - [this](Song* x, std::vector& hl) { + [](Song* x, std::vector& hl) { for (auto& ck : hl) { if (x->HasChartByHash(ck)) { return true; diff --git a/src/Etterna/Actor/Menus/MusicWheel.h b/src/Etterna/Actor/Menus/MusicWheel.h index bb27e25b00..f7dd1c56b0 100644 --- a/src/Etterna/Actor/Menus/MusicWheel.h +++ b/src/Etterna/Actor/Menus/MusicWheel.h @@ -58,7 +58,7 @@ class MusicWheel : public WheelBase return dynamic_cast(m_CurWheelItemData[i]); } - virtual void ReloadSongList(bool searching, const std::string& findme); + void ReloadSongList(bool searching, const std::string& findme) override; void SetHashList(const std::vector& newHashList); void SetOutHashList(const std::vector& newOutHashList); diff --git a/src/Etterna/Actor/Menus/MusicWheelItem.cpp b/src/Etterna/Actor/Menus/MusicWheelItem.cpp index 27ba3fd8de..a2bf09c8d7 100644 --- a/src/Etterna/Actor/Menus/MusicWheelItem.cpp +++ b/src/Etterna/Actor/Menus/MusicWheelItem.cpp @@ -295,15 +295,6 @@ MusicWheelItem::RefreshGrades() if (pWID->m_pSong == nullptr) return; - Difficulty dc; - if (GAMESTATE->m_pCurSteps) - dc = GAMESTATE->m_pCurSteps->GetDifficulty(); - else - dc = GAMESTATE->m_PreferredDifficulty; - - ProfileSlot ps; - ps = static_cast(PLAYER_1); - StepsType st; if (GAMESTATE->m_pCurSteps) st = GAMESTATE->m_pCurSteps->m_StepsType; diff --git a/src/Etterna/Actor/Menus/OptionRow.cpp b/src/Etterna/Actor/Menus/OptionRow.cpp index a80a470a54..bee5ee0a2d 100644 --- a/src/Etterna/Actor/Menus/OptionRow.cpp +++ b/src/Etterna/Actor/Menus/OptionRow.cpp @@ -400,15 +400,6 @@ OptionRow::AfterImportOptions(PlayerNumber pn) for (auto& c : m_Underline) c->SetVisible(false); - // Make all selections the same if bOneChoiceForAllPlayers. - // Hack: we only import active players, so if only player 2 is imported, - // we need to copy p2 to p1, not p1 to p2. - if (m_pHand->m_Def.m_bOneChoiceForAllPlayers) { - PlayerNumber pnCopyFrom = GAMESTATE->GetMasterPlayerNumber(); - if (GAMESTATE->GetMasterPlayerNumber() == PLAYER_INVALID) - pnCopyFrom = PLAYER_1; - } - switch (m_pHand->m_Def.m_selectType) { case SELECT_ONE: { // Make sure the row actually has a selection. @@ -434,9 +425,6 @@ OptionRow::PositionUnderlines(PlayerNumber pn) if (vpUnderlines.empty()) return; - PlayerNumber pnTakeSelectedFrom = - m_pHand->m_Def.m_bOneChoiceForAllPlayers ? PLAYER_1 : pn; - for (int i = 0; i < static_cast(vpUnderlines.size()); i++) { OptionsCursor& ul = *vpUnderlines[i]; @@ -544,9 +532,6 @@ OptionRow::UpdateEnabledDisabled() bool bThisRowHasFocusByAny = false; bThisRowHasFocusByAny |= static_cast(m_bRowHasFocus); - bool bThisRowHasFocusByAll = true; - bThisRowHasFocusByAll &= static_cast(m_bRowHasFocus); - bool bRowEnabled = !m_pHand->m_Def.m_vEnabledForPlayers.empty(); // Don't tween selection colors at all. @@ -570,18 +555,6 @@ OptionRow::UpdateEnabledDisabled() m_textTitle->PlayCommand(sCmdName); for (unsigned j = 0; j < m_textItems.size(); j++) { - bool bThisItemHasFocusByAny = false; - if (m_bRowHasFocus) { - if (static_cast(j) == GetChoiceInRowWithFocus()) { - bThisItemHasFocusByAny = true; - break; - } - } - - // Logically dead code - // if (bThisItemHasFocusByAny) - // m_textItems[j]->PlayCommand("GainFocus"); - // else m_textItems[j]->PlayCommand("LoseFocus"); } @@ -905,8 +878,6 @@ OptionRow::ImportOptions(const PlayerNumber& vpns) { ASSERT(!m_pHand->m_Def.m_vsChoices.empty()); - PlayerNumber p = PLAYER_1; - FOREACH(bool, m_vbSelected, b) *b = false; @@ -926,8 +897,6 @@ OptionRow::ExportOptions(const PlayerNumber& vpns, bool bRowHasFocus) ASSERT(!m_pHand->m_Def.m_vsChoices.empty()); int iChangeMask = 0; - - PlayerNumber p = PLAYER_1; const bool bFocus = bRowHasFocus; VerifySelected( diff --git a/src/Etterna/Actor/Menus/OptionsCursor.h b/src/Etterna/Actor/Menus/OptionsCursor.h index 732da17b0e..c5499158f5 100644 --- a/src/Etterna/Actor/Menus/OptionsCursor.h +++ b/src/Etterna/Actor/Menus/OptionsCursor.h @@ -18,7 +18,7 @@ class OptionsCursor : public ActorFrame void Load(const std::string& sMetricsGroup, bool bLoadCanGos); void StopTweening() override; - void BeginTweening(float fSecs, TweenType tt = TWEEN_DECELERATE); + void BeginTweening(float fSecs, TweenType tt = TWEEN_DECELERATE) override; void SetBarWidth(int iWidth); int GetBarWidth() const; void SetCanGo(bool bCanGoLeft, bool bCanGoRight); diff --git a/src/Etterna/Actor/Menus/OptionsList.cpp b/src/Etterna/Actor/Menus/OptionsList.cpp index e3650aaeb8..3b516b8aa7 100644 --- a/src/Etterna/Actor/Menus/OptionsList.cpp +++ b/src/Etterna/Actor/Menus/OptionsList.cpp @@ -478,7 +478,7 @@ OptionsList::Input(const InputEventPlus& input) if (input.MenuI == GAME_BUTTON_SELECT) { if (input.type != IET_FIRST_PRESS) return false; - //if( input.type == IET_RELEASE ) + // if( input.type == IET_RELEASE ) { Close(); return true; @@ -641,7 +641,8 @@ OptionsList::SelectionsChanged(const std::string& sRowName) std::vector& bSelections = m_bSelections[sRowName]; if (pHandler->m_Def.m_bOneChoiceForAllPlayers && m_pLinked != nullptr) { - std::vector& bLinkedSelections = m_pLinked->m_bSelections[sRowName]; + std::vector& bLinkedSelections = + m_pLinked->m_bSelections[sRowName]; bLinkedSelections = bSelections; if (m_pLinked->IsOpened()) diff --git a/src/Etterna/Actor/Menus/WheelBase.cpp b/src/Etterna/Actor/Menus/WheelBase.cpp index 19b25e6233..772e440414 100644 --- a/src/Etterna/Actor/Menus/WheelBase.cpp +++ b/src/Etterna/Actor/Menus/WheelBase.cpp @@ -433,15 +433,12 @@ WheelBase::RebuildWheelItems(int iDist) // iIndex is now the index of the lowest WheelItem to draw int iFirst = 0; - int iLast = NUM_WHEEL_ITEMS - 1; if (iDist != INT_MAX) { // Shift items and refresh only those that have changed. CircularShift(items, iDist); if (iDist > 0) iFirst = NUM_WHEEL_ITEMS - iDist; - else if (iDist < 0) - iLast = -iDist - 1; } for (size_t i = iFirst; i < items.size(); i++) { diff --git a/src/Etterna/Actor/Menus/WheelBase.h b/src/Etterna/Actor/Menus/WheelBase.h index 0e87090aab..262d442b8c 100644 --- a/src/Etterna/Actor/Menus/WheelBase.h +++ b/src/Etterna/Actor/Menus/WheelBase.h @@ -70,7 +70,7 @@ class WheelBase : public ActorFrame void RebuildWheelItems(int dist = INT_MAX); // INT_MAX = refresh all // Update the list of songs to match whatever songs are indexed by the song // manager (SONGMAN) - virtual void ReloadSongList() {} + virtual void ReloadSongList(bool searching, const std::string& findme) {} virtual auto GetNumItems() const -> unsigned int { diff --git a/src/Etterna/Globals/SoloCalc.cpp b/src/Etterna/Globals/SoloCalc.cpp index 576360124d..cd75c0a09f 100644 --- a/src/Etterna/Globals/SoloCalc.cpp +++ b/src/Etterna/Globals/SoloCalc.cpp @@ -15,9 +15,11 @@ using namespace ::std; // multipliers to each skillset +/* static const std::array basescalars = { 0.F, 1.F, 1.F, 1.F, 1.F, 1.F, 1.F, 1.F }; +*/ // global multiplier for baseline standardization static constexpr float finalscaler = 2.6f * 1.4f; diff --git a/src/Etterna/Globals/StepMania.cpp b/src/Etterna/Globals/StepMania.cpp index 0e83aaefdd..540f4788fd 100644 --- a/src/Etterna/Globals/StepMania.cpp +++ b/src/Etterna/Globals/StepMania.cpp @@ -396,7 +396,6 @@ AdjustForChangedSystemCapabilities() * Actually, Windows lops off a meg or two; cut off a little lower to treat * 192-meg systems as high-memory. */ const bool HighMemory = (Memory >= 190); - const bool LowMemory = (Memory < 100); // 64 and 96-meg systems /* Two memory-consuming features that we can disable are texture caching and * preloaded banners. Texture caching can use a lot of memory; disable it diff --git a/src/Etterna/Globals/global.h b/src/Etterna/Globals/global.h index 4b7918a123..a5a31f2c15 100644 --- a/src/Etterna/Globals/global.h +++ b/src/Etterna/Globals/global.h @@ -109,7 +109,6 @@ ShowWarningOrTrace(const char* file, const char* message, bool bWarning); // don't pull in LOG here - #ifdef DEBUG // No reason to kill the program. A lot of these don't produce a crash in NDEBUG // so why stop? @@ -141,8 +140,21 @@ template struct CompileAssertDecl { }; + +// Ignore "unused-local-typedef" warnings for COMPILE_ASSERT +#if defined(__clang__) +#define COMPILE_ASSERT_PRE \ + _Pragma("clang diagnostic push") \ + _Pragma("clang diagnostic ignored \"-Wunused-local-typedef\"") +#define COMPILE_ASSERT_POST _Pragma("clang diagnostic pop") +#else +#define COMPILE_ASSERT_PRE +#define COMPILE_ASSERT_POST +#endif #define COMPILE_ASSERT(COND) \ - typedef CompileAssertDecl)> CompileAssertInst + COMPILE_ASSERT_PRE \ + typedef CompileAssertDecl)> \ + CompileAssertInst COMPILE_ASSERT_POST #include "RageUtil/Misc/RageException.h" /* Don't include our own headers here, since they tend to change often. */ diff --git a/src/Etterna/MinaCalc/Dependent/HD_PatternMods/CJOHAnchor.h b/src/Etterna/MinaCalc/Dependent/HD_PatternMods/CJOHAnchor.h index 8af1d3b45e..7c61918362 100644 --- a/src/Etterna/MinaCalc/Dependent/HD_PatternMods/CJOHAnchor.h +++ b/src/Etterna/MinaCalc/Dependent/HD_PatternMods/CJOHAnchor.h @@ -97,7 +97,7 @@ struct CJOHAnchorMod // 11[12]22 auto csF = static_cast(max_chain_swaps); // 11[12]11 - auto cnF = static_cast(max_not_swaps); + // auto cnF = static_cast(max_not_swaps); // 111[12]222 = 1[12]2[12]1[12]2 auto clF = static_cast(max_total_len); // 1[12]2[12]1[12]2 = small number < 11111111111[12]2222 @@ -111,7 +111,7 @@ struct CJOHAnchorMod auto anchor_worth = fastsqrt(anchor_len_worth / tapsF) * len_scaler; auto swap_worth = fastsqrt(csF / tapsF) * swap_scaler; - auto not_swap_worth = fastsqrt(cnF / tapsF) * not_swap_scaler; + // auto not_swap_worth = fastsqrt(cnF / tapsF) * not_swap_scaler; pmod = std::clamp(base + anchor_worth + swap_worth + not_swap_scaler, min_mod, max_mod); } diff --git a/src/Etterna/MinaCalc/Dependent/HD_Sequencers/GenericSequencing.h b/src/Etterna/MinaCalc/Dependent/HD_Sequencers/GenericSequencing.h index fd4d7e066d..79382c1866 100644 --- a/src/Etterna/MinaCalc/Dependent/HD_Sequencers/GenericSequencing.h +++ b/src/Etterna/MinaCalc/Dependent/HD_Sequencers/GenericSequencing.h @@ -128,6 +128,7 @@ struct Finger_Sequencing /// returns an adjusted MS average value, not converted to nps inline virtual float get_ms() = 0; + virtual ~Finger_Sequencing() = default; }; /// Individual jacks, rather than anchors, with more nuance. diff --git a/src/Etterna/MinaCalc/SequencedBaseDiffCalc.h b/src/Etterna/MinaCalc/SequencedBaseDiffCalc.h index b09698a1c7..f75267e38b 100644 --- a/src/Etterna/MinaCalc/SequencedBaseDiffCalc.h +++ b/src/Etterna/MinaCalc/SequencedBaseDiffCalc.h @@ -182,8 +182,7 @@ struct nps } if (populated_intervals > 0) { - const auto empty_intervals = - static_cast(calc.numitv - populated_intervals); + // const auto empty_intervals = static_cast(calc.numitv - populated_intervals); avg_notes /= populated_intervals; auto failed_intervals = 0; diff --git a/src/Etterna/Models/Fonts/Font.cpp b/src/Etterna/Models/Fonts/Font.cpp index a1d7f9ed2a..134f0af5e1 100644 --- a/src/Etterna/Models/Fonts/Font.cpp +++ b/src/Etterna/Models/Fonts/Font.cpp @@ -382,9 +382,16 @@ Font::GetGlyph(wchar_t c) const * shooting a blank really...DarkLink kept running into the stupid assert * with non-roman song titles, and looking at it, I'm gonna guess that * this is how ITG2 prevented crashing with them --infamouspat */ +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-constant-out-of-range-compare" +#endif // ASSERT(c >= 0 && c <= 0xFFFFFF); if (c < 0 || c > 0xFFFFFF) c = 1; +#if defined(__clang__) +#pragma clang diagnostic pop +#endif // Fast path: if (c < static_cast(ARRAYLEN(m_iCharToGlyphCache)) && diff --git a/src/Etterna/Models/HighScore/HighScore.cpp b/src/Etterna/Models/HighScore/HighScore.cpp index 309d5b0c3c..5c06bcaa8c 100644 --- a/src/Etterna/Models/HighScore/HighScore.cpp +++ b/src/Etterna/Models/HighScore/HighScore.cpp @@ -1106,7 +1106,6 @@ Screenshot::LoadFromNode(const XNode* pNode) pNode->GetChildValue("FileName", sFileName); pNode->GetChildValue("MD5", sMD5); - const auto* pHighScore = pNode->GetChild("HighScore"); } auto diff --git a/src/Etterna/Models/Misc/AdjustSync.cpp b/src/Etterna/Models/Misc/AdjustSync.cpp index c3305dbcd1..7a7a41999b 100644 --- a/src/Etterna/Models/Misc/AdjustSync.cpp +++ b/src/Etterna/Models/Misc/AdjustSync.cpp @@ -239,7 +239,6 @@ void AdjustSync::GetSyncChangeTextSong(std::vector& vsAddTo) { if (!GAMESTATE->isplaylistcourse && GAMESTATE->m_pCurSong.Get()) { - unsigned int iOriginalSize = vsAddTo.size(); auto& original = s_vpTimingDataOriginal[0]; auto& testing = GAMESTATE->m_pCurSong->m_SongTiming; diff --git a/src/Etterna/Models/Misc/DBProfile.cpp b/src/Etterna/Models/Misc/DBProfile.cpp index adf9b698d0..f1aa22bbd8 100644 --- a/src/Etterna/Models/Misc/DBProfile.cpp +++ b/src/Etterna/Models/Misc/DBProfile.cpp @@ -978,8 +978,6 @@ DBProfile::SavePlayerScores(SQLite::Database* db, if (mode == WriteOnlyWebExport) break; if (mode == LocalWithReplayData) { - auto scoreID = static_cast( - sqlite3_last_insert_rowid(db->getHandle())); try { // Save Replay Data if (hs->LoadReplayData()) { diff --git a/src/Etterna/Models/Misc/DisplaySpec.h b/src/Etterna/Models/Misc/DisplaySpec.h index a379e7ad30..79059546aa 100644 --- a/src/Etterna/Models/Misc/DisplaySpec.h +++ b/src/Etterna/Models/Misc/DisplaySpec.h @@ -107,9 +107,9 @@ class DisplaySpec DisplaySpec(std::string id, std::string name, DisplayMode mode) : m_sId(std::move(std::move(id))) , m_sName(std::move(std::move(name))) - , m_bIsVirtual(false) , m_bCurModeActive(true) , m_CurMode(mode) + , m_bIsVirtual(false) { m_sModes.insert(mode); m_rectBounds = RectI(0, 0, mode.width, mode.height); diff --git a/src/Etterna/Models/Misc/GameConstantsAndTypes.cpp b/src/Etterna/Models/Misc/GameConstantsAndTypes.cpp index 01ad9e8b69..254eddc1f8 100644 --- a/src/Etterna/Models/Misc/GameConstantsAndTypes.cpp +++ b/src/Etterna/Models/Misc/GameConstantsAndTypes.cpp @@ -329,12 +329,6 @@ static const char* ProfileSlotNames[] = { XToString(ProfileSlot); LuaXType(ProfileSlot); -static const char* StageAwardNames[] = { - "FullComboW3", "SingleDigitW3", "OneW3", "FullComboW2", - "SingleDigitW2", "OneW2", "FullComboW1", "80PercentW3", - "90PercentW3", "100PercentW3", -}; - void DisplayBpms::Add(float f) { diff --git a/src/Etterna/Models/Misc/Grade.h b/src/Etterna/Models/Misc/Grade.h index 3a178dc638..d743ebd33c 100644 --- a/src/Etterna/Models/Misc/Grade.h +++ b/src/Etterna/Models/Misc/Grade.h @@ -39,7 +39,7 @@ enum Grade * @param g the grade to convert. * @return the string reprsentation. */ -static auto +inline auto GradeToString(Grade g) -> std::string { ASSERT_M((g >= 0 && g < NUM_Grade) || g == Grade_Invalid, diff --git a/src/Etterna/Models/Misc/OptionRowHandler.cpp b/src/Etterna/Models/Misc/OptionRowHandler.cpp index 9dfef50ca5..9523c17f42 100644 --- a/src/Etterna/Models/Misc/OptionRowHandler.cpp +++ b/src/Etterna/Models/Misc/OptionRowHandler.cpp @@ -1346,7 +1346,6 @@ class OptionRowHandlerConfig : public OptionRowHandler const PlayerNumber& vpns, std::vector& vbSelectedOut) const override { - auto p = vpns; auto& vbSelOut = vbSelectedOut; const auto iSelection = m_pOpt->Get(); @@ -1359,7 +1358,6 @@ class OptionRowHandlerConfig : public OptionRowHandler { auto bChanged = false; - auto p = vpns; const auto& vbSel = vbSelected; const auto iSel = OptionRowHandlerUtil::GetOneSelection(vbSel); @@ -1443,7 +1441,6 @@ class OptionRowHandlerStepsType : public OptionRowHandler const PlayerNumber& vpns, std::vector& vbSelectedOut) const override { - auto p = vpns; auto& vbSelOut = vbSelectedOut; if (GAMESTATE->m_pCurSteps != nullptr) { @@ -1463,7 +1460,6 @@ class OptionRowHandlerStepsType : public OptionRowHandler const std::vector& vbSelected) const -> int override { - auto p = vpns; const auto& vbSel = vbSelected; const auto index = OptionRowHandlerUtil::GetOneSelection(vbSel); diff --git a/src/Etterna/Models/Misc/Profile.cpp b/src/Etterna/Models/Misc/Profile.cpp index 78534ade8f..8c60240850 100644 --- a/src/Etterna/Models/Misc/Profile.cpp +++ b/src/Etterna/Models/Misc/Profile.cpp @@ -432,9 +432,6 @@ Profile::LoadEditableDataFromDir(const std::string& sDir) { const auto fn = sDir + EDITABLE_INI; - // Don't load unreasonably large editable.xml files. - auto iBytes = FILEMAN->GetFileSizeInBytes(fn); - if (!IsAFile(fn)) return ProfileLoadResult_FailedNoProfile; @@ -804,23 +801,22 @@ class LunaProfile : public Luna // TODO: SCOREMAN static int GetMostPopularSong(T* p, lua_State* L) { - lua_pushnil(L); return 1; } // USE SCOREMAN FOR THIS + // TODO: Remove? static int GetSongNumTimesPlayed(T* p, lua_State* L) { ASSERT(!lua_isnil(L, 1)); - auto* pS = Luna::check(L, 1); lua_pushnumber(L, 0); return 1; } // USE SCOREMAN FOR THIS + // TODO: Remove? static int HasPassedAnyStepsInSong(T* p, lua_State* L) { ASSERT(!lua_isnil(L, 1)); - auto* pS = Luna::check(L, 1); lua_pushboolean(L, false); return 1; } diff --git a/src/Etterna/Models/Misc/TimingData.cpp b/src/Etterna/Models/Misc/TimingData.cpp index abf24be111..01023b782d 100644 --- a/src/Etterna/Models/Misc/TimingData.cpp +++ b/src/Etterna/Models/Misc/TimingData.cpp @@ -1063,16 +1063,6 @@ TimingData::DeleteRows(int iStartRow, int iRowsToDelete) float TimingData::GetDisplayedSpeedPercent(float fBeat, float fMusicSeconds) const { - /* HACK: Somehow we get called into this function when there is no - * TimingData to work with. This seems to happen the most upon - * leaving the editor. Still, cover our butts in case this instance - * isn't existing. */ - /* ...but force a crash, so debuggers will catch it and stop here. - * That'll make us keep this bug in mind. -- vyhd */ - if (this == nullptr) { - DEBUG_ASSERT(this); - return 1.0f; - } const auto& speeds = GetTimingSegments(SEGMENT_SPEED); if (speeds.empty()) { diff --git a/src/Etterna/Models/NoteData/NoteDataUtil.cpp b/src/Etterna/Models/NoteData/NoteDataUtil.cpp index 90714e45a2..cdfbfc0ff2 100644 --- a/src/Etterna/Models/NoteData/NoteDataUtil.cpp +++ b/src/Etterna/Models/NoteData/NoteDataUtil.cpp @@ -128,7 +128,6 @@ LoadFromSMNoteDataStringWithPlayer(NoteData& out, for (unsigned l = 0; l < aMeasureLines.size(); l++) { const auto* p = aMeasureLines[l].first; - const auto* const beginLine = p; const auto* const endLine = aMeasureLines[l].second; const auto fPercentIntoMeasure = @@ -172,7 +171,7 @@ LoadFromSMNoteDataStringWithPlayer(NoteData& out, // This is the end of a hold. Search for the beginning. int iHeadRow; if (!out.IsHoldNoteAtRow(iTrack, iIndex, &iHeadRow)) { - int n = intptr_t(endLine) - intptr_t(beginLine); + //int n = intptr_t(endLine) - intptr_t(beginLine); } else { out.FindTapNote(iTrack, iHeadRow) ->second.iDuration = iIndex - iHeadRow; diff --git a/src/Etterna/Models/NoteData/NoteDataWithScoring.cpp b/src/Etterna/Models/NoteData/NoteDataWithScoring.cpp index 214846454d..a69635c3d7 100644 --- a/src/Etterna/Models/NoteData/NoteDataWithScoring.cpp +++ b/src/Etterna/Models/NoteData/NoteDataWithScoring.cpp @@ -193,7 +193,6 @@ NoteDataWithScoring::GetActualRadarValues(const NoteData& in, // Some of this logic is similar or identical to // NoteDataUtil::CalculateRadarValues because I couldn't figure out a good // way to combine them into one. -Kyz - auto pn = pss.m_player_number; garv_state state; auto curr_note = in.GetTapNoteRangeAllTracks(0, MAX_NOTE_ROW); diff --git a/src/Etterna/Models/NoteLoaders/NotesLoaderKSF.cpp b/src/Etterna/Models/NoteLoaders/NotesLoaderKSF.cpp index e241ff2a75..17b0c1a4d2 100644 --- a/src/Etterna/Models/NoteLoaders/NotesLoaderKSF.cpp +++ b/src/Etterna/Models/NoteLoaders/NotesLoaderKSF.cpp @@ -255,7 +255,6 @@ LoadFromKSFFile(const std::string& sPath, for (t = 0; t < 13; t++) iHoldStartRow[t] = -1; - auto newTick = -1; auto fCurBeat = 0.0f; auto prevBeat = 0.0f; // Used for hold tails. @@ -601,7 +600,6 @@ LoadGlobalData(const std::string& sPath, Song& out, bool& bKIUCompliant) HandleBunki(out.m_SongTiming, BPM2, BPM3, SMGap2, BPMPos3); } } else { - auto fCurBeat = 0.0f; auto bDMRequired = false; for (auto& NoteRowString : vNoteRows) { @@ -627,8 +625,6 @@ LoadGlobalData(const std::string& sPath, Song& out, bool& bKIUCompliant) // ignore whatever else... // continue; } - - fCurBeat += 1.0f / iTickCount; } } diff --git a/src/Etterna/Models/NoteLoaders/NotesLoaderSSC.h b/src/Etterna/Models/NoteLoaders/NotesLoaderSSC.h index e32d89ba16..213add9d5b 100644 --- a/src/Etterna/Models/NoteLoaders/NotesLoaderSSC.h +++ b/src/Etterna/Models/NoteLoaders/NotesLoaderSSC.h @@ -53,13 +53,13 @@ struct StepsTagInfo StepsTagInfo(SSCLoader* l, Song* s, const std::string& p, bool fc) : loader(l) , song(s) + , steps(nullptr) + , timing(nullptr) , path(p) , has_own_timing(false) , ssc_format(false) , from_cache(fc) - , steps(nullptr) , for_load_edit(false) - , timing(nullptr) { params = nullptr; } diff --git a/src/Etterna/Models/Songs/SongCacheIndex.cpp b/src/Etterna/Models/Songs/SongCacheIndex.cpp index 92853246d7..4de2215dfa 100644 --- a/src/Etterna/Models/Songs/SongCacheIndex.cpp +++ b/src/Etterna/Models/Songs/SongCacheIndex.cpp @@ -568,7 +568,7 @@ SongCacheIndex::CacheSong(Song& song, const std::string& dir) const dir.c_str()); continue; } - auto stepsID = InsertSteps(steps, songID); + InsertSteps(steps, songID); } return true; } catch (std::exception& e) { @@ -1166,7 +1166,7 @@ SongCacheIndex::SongFromStatement(Song* song, SQLite::Statement& query) const auto stepsIndex = 0; pNewNotes = song->CreateSteps(); - int stepsID = qSteps.getColumn(stepsIndex++); + qSteps.getColumn(stepsIndex++);// stepsID std::string chartName = static_cast(qSteps.getColumn(stepsIndex++)); pNewNotes->SetChartName(chartName); diff --git a/src/Etterna/Models/StepsAndStyles/Style.cpp b/src/Etterna/Models/StepsAndStyles/Style.cpp index d03a573a14..d004478707 100644 --- a/src/Etterna/Models/StepsAndStyles/Style.cpp +++ b/src/Etterna/Models/StepsAndStyles/Style.cpp @@ -54,7 +54,7 @@ Style::StyleInputToGameInput(int iCol, { ASSERT_M(iCol < MAX_COLS_PER_PLAYER, ssprintf("C%i", iCol)); - auto bUsingOneSide = true; + // auto bUsingOneSide = true; FOREACH_ENUM(GameController, gc) { @@ -172,13 +172,11 @@ class LunaStyle : public Luna