sources/network/rconsession.cpp

changeset 179
7fc34735178e
parent 168
96ffd13c08a2
child 180
2e7225dbd9b2
--- a/sources/network/rconsession.cpp	Wed Jan 27 12:38:00 2021 +0200
+++ b/sources/network/rconsession.cpp	Wed Jan 27 13:02:51 2021 +0200
@@ -208,15 +208,15 @@
 					{
 						m_interface->tabComplete(m_lastTabComplete, completes[0]);
 					}
-					else if (not completes.is_empty())
+					else if (completes.size() > 0)
 					{
 						m_interface->print("Completions for '%s':\n", m_lastTabComplete.chars());
 
-						for (int i : range(0, completes.size(), 8))
+						for (int i : range(0, static_cast<int>(completes.size()), 8))
 						{
-							Range<int> spliceRange(i, min(i + 8, completes.size()));
-							StringList splice(completes.splice(spliceRange));
-							m_interface->print("- %s\n", splice.join(", ").chars());
+							const int end = min(i + 8, static_cast<int>(completes.size()));
+							StringList splices = splice(completes, i, end);
+							m_interface->print("- %s\n", join_string_list(splices, ", ").chars());
 						}
 					}
 				}
@@ -243,7 +243,7 @@
 			StringList players;
 
 			for (int i = packet.readByte(); i > 0; --i)
-				players.append(packet.readString());
+				players.push_back(packet.readString());
 
 			m_interface->setPlayerNames(players);
 		}

mercurial