Skip to content

Commit e359adc

Browse files
committed
Try to remove a compilation error and a few warnings in server_lobby.cpp
1 parent dcfe18d commit e359adc

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/network/protocols/server_lobby.cpp

+7-6
Original file line numberDiff line numberDiff line change
@@ -1917,7 +1917,7 @@ void ServerLobby::asynchronousUpdate()
19171917
std::string track_name = winner_vote.m_track_name;
19181918
if (ServerConfig::m_soccer_tournament)
19191919
{
1920-
if (m_tournament_game >= m_tournament_arenas.size())
1920+
if (m_tournament_game >= (int)m_tournament_arenas.size())
19211921
m_tournament_arenas.resize(m_tournament_game + 1, "");
19221922
m_tournament_arenas[m_tournament_game] = track_name;
19231923
}
@@ -2138,7 +2138,8 @@ bool ServerLobby::canLiveJoinNow() const
21382138
float total_distance =
21392139
Track::getCurrentTrack()->getTrackLength() *
21402140
(float)RaceManager::get()->getNumLaps();
2141-
float progress = leader_distance / total_distance;
2141+
// standard version uses (leader_distance / total_distance > 0.9f)
2142+
// TODO: allow switching
21422143
if (total_distance - leader_distance < 250.0)
21432144
return false;
21442145
}
@@ -2400,7 +2401,6 @@ void ServerLobby::finishedLoadingLiveJoinClient(Event* event)
24002401
live_join_start_time += 3000;
24012402

24022403
bool spectator = false;
2403-
FreeForAll* ffa_world = dynamic_cast<FreeForAll*>(World::getWorld());
24042404
for (const int id : peer->getAvailableKartIDs())
24052405
{
24062406
const RemoteKartInfo& rki = RaceManager::get()->getKartInfo(id);
@@ -2570,7 +2570,7 @@ void ServerLobby::update(int ticks)
25702570
peer->getPlayerProfiles()[0]->getName()).c_str();
25712571
Log::info("ServerLobby", "%s %s has been idle on the server for "
25722572
"more than %d seconds, kick.",
2573-
peer->getAddress().toString().c_str(), peer_name, sec);
2573+
peer->getAddress().toString().c_str(), peer_name.c_str(), sec);
25742574
peer->kick();
25752575
}
25762576
}
@@ -6830,7 +6830,7 @@ void ServerLobby::storeResults()
68306830
}
68316831
}
68326832
m_saved_ffa_points.clear();
6833-
for (int i = 0; i < usernames.size(); ++i)
6833+
for (int i = 0; i < (int)usernames.size(); ++i)
68346834
{
68356835
std::string query = StringUtils::insertValues(
68366836
"INSERT INTO %s "
@@ -6852,7 +6852,8 @@ void ServerLobby::storeResults()
68526852
#endif
68536853
);
68546854
std::string name = usernames[i];
6855-
bool written = easySQLQuery(query, [name](sqlite3_stmt* stmt)
6855+
//bool written =
6856+
easySQLQuery(query, [name](sqlite3_stmt* stmt)
68566857
{
68576858
if (sqlite3_bind_text(stmt, 1, name.c_str(),
68586859
-1, SQLITE_TRANSIENT) != SQLITE_OK)

0 commit comments

Comments
 (0)