sources/network/rconsession.cpp

changeset 179
7fc34735178e
parent 168
96ffd13c08a2
child 180
2e7225dbd9b2
equal deleted inserted replaced
173:248fba6d1e76 179:7fc34735178e
206 206
207 if (completes.size() == 1) 207 if (completes.size() == 1)
208 { 208 {
209 m_interface->tabComplete(m_lastTabComplete, completes[0]); 209 m_interface->tabComplete(m_lastTabComplete, completes[0]);
210 } 210 }
211 else if (not completes.is_empty()) 211 else if (completes.size() > 0)
212 { 212 {
213 m_interface->print("Completions for '%s':\n", m_lastTabComplete.chars()); 213 m_interface->print("Completions for '%s':\n", m_lastTabComplete.chars());
214 214
215 for (int i : range(0, completes.size(), 8)) 215 for (int i : range(0, static_cast<int>(completes.size()), 8))
216 { 216 {
217 Range<int> spliceRange(i, min(i + 8, completes.size())); 217 const int end = min(i + 8, static_cast<int>(completes.size()));
218 StringList splice(completes.splice(spliceRange)); 218 StringList splices = splice(completes, i, end);
219 m_interface->print("- %s\n", splice.join(", ").chars()); 219 m_interface->print("- %s\n", join_string_list(splices, ", ").chars());
220 } 220 }
221 } 221 }
222 } 222 }
223 break; 223 break;
224 } 224 }
241 case SVRCU_PLAYERDATA: 241 case SVRCU_PLAYERDATA:
242 { 242 {
243 StringList players; 243 StringList players;
244 244
245 for (int i = packet.readByte(); i > 0; --i) 245 for (int i = packet.readByte(); i > 0; --i)
246 players.append(packet.readString()); 246 players.push_back(packet.readString());
247 247
248 m_interface->setPlayerNames(players); 248 m_interface->setPlayerNames(players);
249 } 249 }
250 break; 250 break;
251 251

mercurial