diff --git a/Encore/src/song/events/EncEventVects/EncEventVect.h b/Encore/src/song/events/EncEventVects/EncEventVect.h index d365a819..8a186305 100644 --- a/Encore/src/song/events/EncEventVects/EncEventVect.h +++ b/Encore/src/song/events/EncEventVects/EncEventVect.h @@ -9,6 +9,7 @@ template struct EncEventVect { + virtual ~EncEventVect() = default; std::vector events {}; t& operator=(int event) { diff --git a/Encore/src/song/events/EncEventVects/EventVectors.h b/Encore/src/song/events/EncEventVects/EventVectors.h index 4880271a..6722e74f 100644 --- a/Encore/src/song/events/EncEventVects/EventVectors.h +++ b/Encore/src/song/events/EncEventVects/EventVectors.h @@ -8,8 +8,8 @@ #include "EncEventVect.h" #include "../EncEvents/EncChartEvents.h" -struct SoloEvents : EncEventVect { - void UpdateEventViaNote(Note& note, int curEvent) override { +struct SoloEvents final : EncEventVect { + void UpdateEventViaNote(Note& note, const int curEvent) override { if (!events.empty()) { if (note.time >= events[curEvent].StartSec && note.time < events[curEvent].EndSec) { @@ -23,9 +23,9 @@ struct SoloEvents : EncEventVect { } }; -struct FillEvents : EncEventVect {}; +struct FillEvents final : EncEventVect {}; -struct ODEvents : EncEventVect { +struct ODEvents final : EncEventVect { void ResetEvents() override { for (auto event : events) { event.NotesHit = 0; @@ -33,7 +33,7 @@ struct ODEvents : EncEventVect { event.missed = false; } } - void UpdateEventViaNote(Note& note, int curEvent) override { + void UpdateEventViaNote(Note& note, const int curEvent) override { if (!events.empty()) { if (note.time >= events[curEvent].StartSec && note.time < events[curEvent].EndSec) { @@ -53,7 +53,7 @@ struct ODEvents : EncEventVect { } } } - void RenderNotesAsOD(Note& note, int curEvent) { + void RenderNotesAsOD(Note& note, const int curEvent) const { if (!events.empty()) { if (note.time >= events[curEvent].StartSec && note.time < events[curEvent].EndSec) { @@ -65,7 +65,7 @@ struct ODEvents : EncEventVect { } } } - float AddOverdrive(int phrase) { + float AddOverdrive(const int phrase) { if (!events.empty()){ if (events[phrase].NoteCount == events[phrase].NotesHit && !events[phrase].added @@ -73,13 +73,13 @@ struct ODEvents : EncEventVect { events[phrase].added = true; return 0.25f; } - return 0; } + return 0; } }; -struct SectionEvents : EncEventVect
{ - void UpdateEventViaNote(Note& note, int curEvent) override { +struct SectionEvents final : EncEventVect
{ + void UpdateEventViaNote(Note& note, const int curEvent) override { if (!events.empty()) { if (note.time >= events[curEvent].StartSec && note.time < events[curEvent].EndSec) {