Skip to content

Commit

Permalink
fix: shadows outer variable
Browse files Browse the repository at this point in the history
  • Loading branch information
dudantas committed Sep 14, 2023
1 parent fd8f97b commit b8be979
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/creatures/players/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1140,8 +1140,8 @@ std::shared_ptr<DepotLocker> Player::getDepotLocker(uint32_t depotId) {
depotBox->setParent(depotChest);
inbox->setParent(depotLocker);

if (std::shared_ptr<DepotChest> depotBox = getDepotChest(i, false)) {
depotBox->setParent(depotLocker->getItemByIndex(0)->getContainer());
if (auto depotChestCache = getDepotChest(i, false)) {
depotChestCache->setParent(depotLocker->getItemByIndex(0)->getContainer());
}
}
depotLocker->internalAddThing(depotChest);
Expand Down

0 comments on commit b8be979

Please sign in to comment.