Skip to content

Commit

Permalink
improve: to const ref
Browse files Browse the repository at this point in the history
  • Loading branch information
dudantas authored Nov 2, 2024
1 parent d91ac57 commit 31692ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/io/functions/iologindata_load_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ bool IOLoginDataLoad::loadPlayerBasicInfo(const std::shared_ptr<Player> &player,
if (!town) {
g_logger().error("Player {} has invalid town id {}. Attempting to set the correct town.", player->name, result->getNumber<uint16_t>("town_id"));

auto thaisTown = g_game().map.towns.getTown("Thais");
const auto &thaisTown = g_game().map.towns.getTown("Thais");
if (thaisTown) {
player->town = thaisTown;
g_logger().warn("Assigned town 'Thais' to player {}", player->name);
Expand Down

0 comments on commit 31692ee

Please sign in to comment.