Skip to content

Commit

Permalink
more compiler warns
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Jul 24, 2018
1 parent 24f9ecf commit ffc2a2d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/DownloadManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1025,8 +1025,8 @@ void DownloadManager::RequestChartLeaderBoard(string chartkey)
if (FILTERMAN->currentrateonlyforonlineleaderboardrankings)
if(lround(tmp.rate * 10000.f) != lround(currentrate * 10000.f))
continue;
tmp.nocc = score.value("noCC", 0) == 1;
tmp.valid = score.value("valid", 0) == 1;
tmp.nocc = score.value("noCC", 0) != 0;
tmp.valid = score.value("valid", 0) != 0;

auto ssrs = *(score.find("skillsets"));
FOREACH_ENUM(Skillset, ss)
Expand Down
8 changes: 4 additions & 4 deletions src/NetworkSyncManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ void ETTProtocol::FindJsonChart(NetworkSyncManager* n, json& ch)
}
else {
vector <Song *> AllSongs = SONGMAN->GetAllSongs();
for (int i = 0; i < AllSongs.size(); i++)
for (size_t i = 0; i < AllSongs.size(); i++)
{
auto& m_cSong = AllSongs[i];
if ((n->m_sArtist.empty() || n->m_sArtist == m_cSong->GetTranslitArtist()) &&
Expand Down Expand Up @@ -629,7 +629,7 @@ void ETTProtocol::Update(NetworkSyncManager* n, float fDeltaTime)
EndOfGame_PlayerData result;
hs.SetScoreKey(score.value("scorekey", ""));
hs.SetSSRNormPercent(score.value("ssr_norm", 0));
hs.SetEtternaValid(score.value("valid", 0));
hs.SetEtternaValid(score.value("valid", 0) !=0);
hs.SetModifiers(score.value("mods", ""));
FOREACH_ENUM(Skillset, ss)
hs.SetSkillsetSSR(ss, score.value(SkillsetToString(ss).c_str(), 0));
Expand Down Expand Up @@ -1304,9 +1304,9 @@ void ETTProtocol::ReportHighScore(HighScore* hs, PlayerStageStats& pss)
payload["replay"] = json::object();
payload["replay"]["noterows"] = json::array();
payload["replay"]["offsets"] = json::array();
for (int i = 0; i < noterows.size(); i++)
for (size_t i = 0; i < noterows.size(); i++)
payload["replay"]["noterows"].push_back(noterows[i]);
for (int i = 0; i < offsets.size(); i++)
for (size_t i = 0; i < offsets.size(); i++)
payload["replay"]["offsets"].push_back(offsets[i]);
}
Send(j);
Expand Down
4 changes: 2 additions & 2 deletions src/ScreenNetEvaluation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,14 +238,14 @@ class LunaScreenNetEvaluation: public Luna<ScreenNetEvaluation>
public:
static int GetNumActivePlayers( T* p, lua_State *L ) { lua_pushnumber( L, p->GetNumActivePlayers() ); return 1; }
static int GetHighScore(T* p, lua_State *L) {
if (NSMAN->m_EvalPlayerData.size() - 1 >= p->m_iCurrentPlayer)
if (static_cast<int>(NSMAN->m_EvalPlayerData.size()) - 1 >= p->m_iCurrentPlayer)
NSMAN->m_EvalPlayerData[p->m_iCurrentPlayer].hs.PushSelf(L);
else
lua_pushnil(L);
return 1;
}
static int GetOptions(T* p, lua_State *L) {
if (NSMAN->m_EvalPlayerData.size() - 1 >= p->m_iCurrentPlayer)
if (static_cast<int>(NSMAN->m_EvalPlayerData.size()) - 1 >= p->m_iCurrentPlayer)
lua_pushstring(L, NSMAN->m_EvalPlayerData[p->m_iCurrentPlayer].playerOptions);
else
lua_pushnil(L);
Expand Down

0 comments on commit ffc2a2d

Please sign in to comment.