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 -3
View File
@@ -146,13 +146,12 @@ void ServerState::remove_lobby(uint32_t lobby_id) {
this->id_to_lobby.erase(lobby_id);
}
shared_ptr<Client> ServerState::find_client(const char16_t* identifier,
shared_ptr<Client> ServerState::find_client(const std::u16string* identifier,
uint64_t serial_number, shared_ptr<Lobby> l) {
if ((serial_number == 0) && identifier) {
try {
string encoded = encode_sjis(identifier);
serial_number = stoull(encoded, nullptr, 0);
serial_number = stoull(encode_sjis(*identifier), nullptr, 0);
} catch (const exception&) { }
}