Skip to content

Commit

Permalink
move pattern mod resize calls into a loop
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Apr 21, 2020
1 parent 7a78560 commit bf63b5e
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/Etterna/Globals/MinaCalc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,11 @@ Calc::InitializeHands(const vector<NoteInfo>& NoteInfo, float music_rate)
right_hand.debugValues[i].resize(numitv);
}
}
for (size_t i = 0; i < DebugCount; ++i) {
left_hand.doot[i].resize(nervIntervals.size());
right_hand.doot[i].resize(nervIntervals.size());
}


ProcessedFingers fingers;
for (int i = 0; i < 4; i++) {
Expand Down Expand Up @@ -649,8 +654,6 @@ Calc::SetAnchorMod(const vector<NoteInfo>& NoteInfo,
unsigned int secondNote,
vector<float> doot[ModCount])
{
doot[Anchor].resize(nervIntervals.size());

for (size_t i = 0; i < nervIntervals.size(); i++) {
int lcol = 0;
int rcol = 0;
Expand Down Expand Up @@ -683,8 +686,6 @@ Calc::SetAnchorMod(const vector<NoteInfo>& NoteInfo,
void
Calc::SetHSMod(const vector<NoteInfo>& NoteInfo, vector<float> doot[ModCount])
{
doot[HS].resize(nervIntervals.size());

for (size_t i = 0; i < nervIntervals.size(); i++) {
unsigned int taps = 0;
unsigned int handtaps = 0;
Expand Down Expand Up @@ -746,9 +747,6 @@ Calc::SetSequentialDownscalers(const vector<NoteInfo>& NoteInfo,
unsigned int t2,
float music_rate, vector<float> doot[ModCount])
{
doot[Roll].resize(nervIntervals.size());
doot[OHJump].resize(nervIntervals.size());

// not sure if these should persist between intervals or not
// not doing so makes the pattern detection slightly more strict
// doing so will give the calc some context from the previous
Expand Down

0 comments on commit bf63b5e

Please sign in to comment.