Skip to content

Commit

Permalink
Code format - (Clang-format)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Sep 30, 2024
1 parent b7849fe commit 185db07
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/creatures/players/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3476,7 +3476,7 @@ std::shared_ptr<Cylinder> Player::queryDestination(int32_t &index, const std::sh
}

// Iterate over all items in the player's containers using ContainerIterator
for (const auto& container : containers) {
for (const auto &container : containers) {
ContainerIterator it(container, static_cast<size_t>(g_configManager().getNumber(MAX_CONTAINER_DEPTH, __FUNCTION__)));
while (it.hasNext()) {
auto currentItem = *it;
Expand Down
6 changes: 3 additions & 3 deletions src/game/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2408,7 +2408,7 @@ std::tuple<ReturnValue, uint32_t, uint32_t> Game::addItemBatch(const std::shared
}
}

for (const auto& container : containers) {
for (const auto &container : containers) {
ContainerIterator it(container, static_cast<size_t>(g_configManager().getNumber(MAX_CONTAINER_DEPTH, __FUNCTION__)));
while (it.hasNext()) {
auto currentItem = *it;
Expand All @@ -2435,7 +2435,7 @@ std::tuple<ReturnValue, uint32_t, uint32_t> Game::addItemBatch(const std::shared
// Collect remainder items to handle them after main loop
std::vector<std::shared_ptr<Item>> remainderItems;

for (const auto& item : items) {
for (const auto &item : items) {
// Try to find a container with space
auto destinationContainer = findAvailableContainer(item);
if (!destinationContainer) {
Expand Down Expand Up @@ -2475,7 +2475,7 @@ std::tuple<ReturnValue, uint32_t, uint32_t> Game::addItemBatch(const std::shared

// Handle remainder items
if (!remainderItems.empty()) {
for (const auto& remainderItem : remainderItems) {
for (const auto &remainderItem : remainderItems) {
ret = internalAddItem(player->getTile(), remainderItem, INDEX_WHEREEVER, FLAG_NOLIMIT);
if (ret != RETURNVALUE_NOERROR) {
break;
Expand Down
4 changes: 2 additions & 2 deletions src/items/containers/container.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1058,14 +1058,14 @@ std::shared_ptr<Container> ContainerIterator::getCurrentContainer() const {
if (states.empty()) {
return nullptr;
}
const auto& top = states.back();
const auto &top = states.back();
return top.container.lock();
}

size_t ContainerIterator::getCurrentIndex() const {
if (states.empty()) {
return 0;
}
const auto& top = states.back();
const auto &top = states.back();
return top.index;
}

0 comments on commit 185db07

Please sign in to comment.