Skip to content

Commit

Permalink
modernize unloadreplaydata function
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Jul 14, 2018
1 parent 6295fe5 commit 2e9ffed
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/HighScore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,18 @@ bool HighScoreImpl::operator==( const HighScoreImpl& other ) const
}

void HighScoreImpl::UnloadReplayData() {
vector<int> tmpi;
vector<float> tmpf;
vNoteRowVector.swap(tmpi);
vOffsetVector.swap(tmpf);
vNoteRowVector.clear();
vOffsetVector.clear();
vTrackVector.clear();
vTapNoteTypeVector.clear();
vTapNoteSubTypeVector.clear();

vNoteRowVector.shrink_to_fit();
vOffsetVector.shrink_to_fit();
vTrackVector.shrink_to_fit();
vTapNoteTypeVector.shrink_to_fit();
vTapNoteSubTypeVector.shrink_to_fit();

ReplayType = 0;
}

Expand Down

0 comments on commit 2e9ffed

Please sign in to comment.