Skip to content

Commit aefebf5

Browse files
remove tn.pn references from notedatautil
1 parent 6b365eb commit aefebf5

2 files changed

Lines changed: 2 additions & 23 deletions

File tree

‎src/Etterna/Models/NoteData/NoteDataUtil.cpp‎

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ LoadFromSMNoteDataStringWithPlayer(NoteData& out,
6666
const RString& sSMNoteData,
6767
int start,
6868
int len,
69-
PlayerNumber pn,
7069
int iNumTracks)
7170
{
7271
/* Don't allocate memory for the entire string, nor per measure. Instead,
@@ -232,7 +231,6 @@ LoadFromSMNoteDataStringWithPlayer(NoteData& out,
232231
* to remove anything in this position. We know that there's
233232
* nothing there, so avoid the search. */
234233
if (tn.type != TapNoteType_Empty && ch != '3') {
235-
tn.pn = pn;
236234
out.SetTapNote(iTrack, iIndex, tn);
237235
}
238236

@@ -549,7 +547,7 @@ NoteDataUtil::LoadFromSMNoteDataString(NoteData& out,
549547
out.Init();
550548
out.SetNumTracks(iNumTracks);
551549
LoadFromSMNoteDataStringWithPlayer(
552-
out, sSMNoteData, 0, sSMNoteData.size(), PLAYER_INVALID, iNumTracks);
550+
out, sSMNoteData, 0, sSMNoteData.size(), iNumTracks);
553551
}
554552

555553
void
@@ -875,7 +873,6 @@ NoteDataUtil::LoadTransformedSlidingWindow(const NoteData& in,
875873
int iOldTrack = t;
876874
int iNewTrack = (iOldTrack + iCurTrackOffset) % iNewNumTracks;
877875
TapNote tn = in.GetTapNote(iOldTrack, r);
878-
tn.pn = PLAYER_INVALID;
879876
out.SetTapNote(iNewTrack, r, tn);
880877
}
881878
}
@@ -945,7 +942,6 @@ NoteDataUtil::LoadOverlapped(const NoteData& in,
945942
if (tnFrom.type == TapNoteType_Empty ||
946943
tnFrom.type == TapNoteType_AutoKeysound)
947944
continue;
948-
tnFrom.pn = PLAYER_INVALID;
949945

950946
// If this is a hold note, find the end.
951947
int iEndIndex = row;
@@ -1323,22 +1319,6 @@ NoteDataUtil::RemoveAllButOneTap(NoteData& inout, int row)
13231319
inout.RevalidateATIs(vector<int>(), false);
13241320
}
13251321

1326-
void
1327-
NoteDataUtil::RemoveAllButPlayer(NoteData& inout, PlayerNumber pn)
1328-
{
1329-
for (int track = 0; track < inout.GetNumTracks(); ++track) {
1330-
NoteData::iterator i = inout.begin(track);
1331-
1332-
while (i != inout.end(track)) {
1333-
if (i->second.pn != pn && i->second.pn != PLAYER_INVALID)
1334-
inout.RemoveTapNote(track, i++);
1335-
else
1336-
++i;
1337-
}
1338-
}
1339-
inout.RevalidateATIs(vector<int>(), false);
1340-
}
1341-
13421322
// TODO: Perform appropriate matrix calculations for everything instead.
13431323
static void
13441324
GetTrackMapping(StepsType st,

‎src/Etterna/Models/NoteData/NoteDataUtil.h‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,7 @@ RemoveStretch(NoteData& inout,
139139
int iEndIndex = MAX_NOTE_ROW);
140140
void
141141
RemoveAllButOneTap(NoteData& inout, int row);
142-
void
143-
RemoveAllButPlayer(NoteData& inout, PlayerNumber pn);
142+
144143
/** @brief The types of transformations available for the NoteData. */
145144
enum TrackMapping
146145
{

0 commit comments

Comments
 (0)