mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-22 19:00:14 -05:00
Update based on feedback
This commit is contained in:
parent
dff0a7c52a
commit
6536d29c61
1 changed files with 2 additions and 2 deletions
|
@ -169,10 +169,10 @@ std::optional<std::size_t> ProfileManager::GetUserIndex(const ProfileInfo& user)
|
||||||
std::optional<std::size_t> ProfileManager::GetUserIndex(const std::string& username) const {
|
std::optional<std::size_t> ProfileManager::GetUserIndex(const std::string& username) const {
|
||||||
const auto iter =
|
const auto iter =
|
||||||
std::find_if(profiles.begin(), profiles.end(), [&username](const ProfileInfo& p) {
|
std::find_if(profiles.begin(), profiles.end(), [&username](const ProfileInfo& p) {
|
||||||
const std::string pusername = Common::StringFromFixedZeroTerminatedBuffer(
|
const std::string profile_username = Common::StringFromFixedZeroTerminatedBuffer(
|
||||||
reinterpret_cast<const char*>(p.username.data()), p.username.size());
|
reinterpret_cast<const char*>(p.username.data()), p.username.size());
|
||||||
|
|
||||||
return username.compare(pusername) == 0;
|
return username.compare(profile_username) == 0;
|
||||||
});
|
});
|
||||||
if (iter == profiles.end()) {
|
if (iter == profiles.end()) {
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
|
|
Loading…
Reference in a new issue