use std::strings in places of c-strings in most places

This commit is contained in:
Martin Michelsen
2022-04-03 23:31:24 -07:00
parent 1d70933c17
commit 06fd71f7a6
19 changed files with 191 additions and 188 deletions
+2 -2
View File
@@ -135,7 +135,7 @@ void Lobby::move_client_to_lobby(shared_ptr<Lobby> dest_lobby,
shared_ptr<Client> Lobby::find_client(const char16_t* identifier,
shared_ptr<Client> Lobby::find_client(const u16string* identifier,
uint64_t serial_number) {
for (size_t x = 0; x < this->max_clients; x++) {
if (!this->clients[x]) {
@@ -145,7 +145,7 @@ shared_ptr<Client> Lobby::find_client(const char16_t* identifier,
(this->clients[x]->license->serial_number == serial_number)) {
return this->clients[x];
}
if (identifier && (this->clients[x]->player.disp.name == identifier)) {
if (identifier && (this->clients[x]->player.disp.name == *identifier)) {
return this->clients[x];
}
}