Skip to content

Commit

Permalink
remove dead code replay parsing in highscore
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Apr 18, 2020
1 parent 1dd2a72 commit 0c3d0f6
Showing 1 changed file with 0 additions and 101 deletions.
101 changes: 0 additions & 101 deletions src/Etterna/Models/Misc/HighScore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,6 @@ struct HighScoreImpl
// unused but here for when we need it (not to be confused
// with hasreplay()) -mina

float RescoreToWifeTS(float ts);

RString OffsetsToString(vector<float> v) const;
vector<float> OffsetsToVector(RString s);
RString NoteRowsToString(vector<int> v) const;
vector<int> NoteRowsToVector(RString s);

bool is39import = false;
int WifeVersion = 0;

Expand Down Expand Up @@ -197,88 +190,6 @@ HighScoreImpl::GetWifeGrade() const
return Grade_Tier16;
}

RString
HighScoreImpl::OffsetsToString(vector<float> v) const
{
RString o = "";
if (v.empty())
return o;

o = to_string(v[0]);
for (size_t i = 1; i < v.size(); i++)
o.append("," + to_string(v[i]));
return o;
}

RString
HighScoreImpl::NoteRowsToString(vector<int> v) const
{
RString o = "";
if (v.empty())
return o;

o = to_string(v[0]);
for (size_t i = 1; i < v.size(); i++)
o.append("," + to_string(v[i]));
return o;
}

vector<float>
HighScoreImpl::OffsetsToVector(RString s)
{
vector<float> o;
size_t startpos = 0;

if (s == "")
return o;

do {
size_t pos;
pos = s.find(",", startpos);
if (pos == s.npos)
pos = s.size();

if (pos - startpos > 0) {
if (startpos == 0 && pos - startpos == s.size())
o.emplace_back(StringToFloat(s));
else {
const RString AddRString = s.substr(startpos, pos - startpos);
o.emplace_back(StringToFloat(AddRString));
}
}
startpos = pos + 1;
} while (startpos <= s.size());
return o;
}

vector<int>
HighScoreImpl::NoteRowsToVector(RString s)
{
vector<int> o;
size_t startpos = 0;

if (s == "")
return o;

do {
size_t pos;
pos = s.find(",", startpos);
if (pos == s.npos)
pos = s.size();

if (pos - startpos > 0) {
if (startpos == 0 && pos - startpos == s.size())
o.emplace_back(StringToInt(s));
else {
const RString AddRString = s.substr(startpos, pos - startpos);
o.emplace_back(StringToInt(AddRString));
}
}
startpos = pos + 1;
} while (startpos <= s.size());
return o;
}

void
HighScoreImpl::ResetSkillsets()
{
Expand Down Expand Up @@ -1560,18 +1471,6 @@ HighScore::RescoreToWifeJudgeDuringLoad(int x)
return o;
}

// do not use for now- mina
float
HighScoreImpl::RescoreToWifeTS(float ts)
{
float p = 0;
FOREACH_CONST(float, vOffsetVector, f)
p += wife2(*f, ts);

p += (iHoldNoteScores[HNS_LetGo] + iHoldNoteScores[HNS_Missed]) * -6.f;
return p / static_cast<float>(vOffsetVector.size() * 2);
}

float
HighScore::RescoreToDPJudge(int x)
{
Expand Down

0 comments on commit 0c3d0f6

Please sign in to comment.