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 2, 2024
1 parent ae5daaa commit b954f4f
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions src/creatures/combat/combat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1451,7 +1451,7 @@ std::vector<std::pair<Position, std::vector<uint32_t>>> Combat::pickChainTargets
if (initialTarget && initialTarget != caster) {
targets.emplace_back(initialTarget);
visited.insert(initialTarget->getID());
resultMap.emplace_back(caster->getPosition(), std::vector<uint32_t>{ initialTarget->getID() });
resultMap.emplace_back(caster->getPosition(), std::vector<uint32_t> { initialTarget->getID() });
} else {
targets.emplace_back(caster);
maxTargets++;
Expand Down Expand Up @@ -1493,7 +1493,7 @@ std::vector<std::pair<Position, std::vector<uint32_t>>> Combat::pickChainTargets
}
}
if (!found) {
resultMap.emplace_back(currentTarget->getPosition(), std::vector<uint32_t>{ closestSpectator->getID() });
resultMap.emplace_back(currentTarget->getPosition(), std::vector<uint32_t> { closestSpectator->getID() });
}

targets.emplace_back(closestSpectator);
Expand Down
6 changes: 3 additions & 3 deletions src/creatures/creature.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ class Creature : virtual public Thing, public SharedObject {
virtual void onGainExperience(uint64_t gainExp, const std::shared_ptr<Creature> &target);
virtual void onAttackedCreatureBlockHit(const BlockType_t &) { }
virtual void onBlockHit() { }
virtual void onTakeDamage(const std::shared_ptr<Creature>&, int32_t) { }
virtual void onTakeDamage(const std::shared_ptr<Creature> &, int32_t) { }
virtual void onChangeZone(ZoneType_t zone);
virtual void onAttackedCreatureChangeZone(ZoneType_t zone);
virtual void onIdleStatus();
Expand Down Expand Up @@ -815,12 +815,12 @@ class Creature : virtual public Thing, public SharedObject {
virtual uint64_t getLostExperience() const {
return 0;
}
virtual void dropLoot(const std::shared_ptr<Container> &, const std::shared_ptr<Creature>&) { }
virtual void dropLoot(const std::shared_ptr<Container> &, const std::shared_ptr<Creature> &) { }
virtual uint16_t getLookCorpse() const {
return 0;
}
virtual void getPathSearchParams(const std::shared_ptr<Creature> &, FindPathParams &fpp);
virtual void death(const std::shared_ptr<Creature>&) { }
virtual void death(const std::shared_ptr<Creature> &) { }
virtual bool dropCorpse(const std::shared_ptr<Creature> &lastHitCreature, const std::shared_ptr<Creature> &mostDamageCreature, bool lastHitUnjustified, bool mostDamageUnjustified);
virtual std::shared_ptr<Item> getCorpse(const std::shared_ptr<Creature> &lastHitCreature, const std::shared_ptr<Creature> &mostDamageCreature);

Expand Down
4 changes: 2 additions & 2 deletions src/creatures/monsters/monster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1935,7 +1935,7 @@ bool Monster::canWalkTo(Position pos, Direction moveDirection) {
return false;
}

void Monster::death(const std::shared_ptr<Creature>&) {
void Monster::death(const std::shared_ptr<Creature> &) {
if (monsterForgeClassification > ForgeClassifications_t::FORGE_NORMAL_MONSTER) {
g_game().removeForgeMonster(getID(), monsterForgeClassification, true);
}
Expand Down Expand Up @@ -2069,7 +2069,7 @@ void Monster::updateLookDirection() {
g_game().internalCreatureTurn(getMonster(), newDir);
}

void Monster::dropLoot(const std::shared_ptr<Container> &corpse, const std::shared_ptr<Creature>&) {
void Monster::dropLoot(const std::shared_ptr<Container> &corpse, const std::shared_ptr<Creature> &) {
if (corpse && lootDrop) {
// Only fiendish drops sliver
if (const ForgeClassifications_t classification = getMonsterForgeClassification();
Expand Down
4 changes: 2 additions & 2 deletions src/creatures/monsters/monsters.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class MonsterType {
public:
MonsterType() = default;
explicit MonsterType(const std::string &initName) :
name(initName), typeName(initName), nameDescription(initName) {}
name(initName), typeName(initName), nameDescription(initName) { }

// non-copyable
MonsterType(const MonsterType &) = delete;
Expand Down Expand Up @@ -203,7 +203,7 @@ class MonsterType {
return !info.bosstiaryClass.empty();
}

void loadLoot(const std::shared_ptr<MonsterType> &monsterType, LootBlock lootblock) const ;
void loadLoot(const std::shared_ptr<MonsterType> &monsterType, LootBlock lootblock) const;

bool canSpawn(const Position &pos) const;
};
Expand Down
4 changes: 2 additions & 2 deletions src/creatures/players/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3113,7 +3113,7 @@ bool Player::hasCapacity(const std::shared_ptr<Item> &item, uint32_t count) cons
return itemWeight <= getFreeCapacity();
}

ReturnValue Player::queryAdd(int32_t index, const std::shared_ptr<Thing> &thing, uint32_t count, uint32_t flags, const std::shared_ptr<Creature>&) {
ReturnValue Player::queryAdd(int32_t index, const std::shared_ptr<Thing> &thing, uint32_t count, uint32_t flags, const std::shared_ptr<Creature> &) {
const auto &item = thing->getItem();
if (item == nullptr) {
g_logger().error("[Player::queryAdd] - Item is nullptr");
Expand Down Expand Up @@ -3406,7 +3406,7 @@ ReturnValue Player::queryMaxCount(int32_t index, const std::shared_ptr<Thing> &t
return RETURNVALUE_NOERROR;
}

ReturnValue Player::queryRemove(const std::shared_ptr<Thing> &thing, uint32_t count, uint32_t flags, const std::shared_ptr<Creature>& /*= nullptr */) {
ReturnValue Player::queryRemove(const std::shared_ptr<Thing> &thing, uint32_t count, uint32_t flags, const std::shared_ptr<Creature> & /*= nullptr */) {
const int32_t index = getThingIndex(thing);
if (index == -1) {
return RETURNVALUE_NOTPOSSIBLE;
Expand Down
2 changes: 1 addition & 1 deletion src/creatures/players/player.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2727,7 +2727,7 @@ class Player final : public Creature, public Cylinder, public Bankable {
void addBestiaryKill(const std::shared_ptr<MonsterType> &mType);
void addBosstiaryKill(const std::shared_ptr<MonsterType> &mType);

phmap::flat_hash_set<uint32_t> attackedSet{};
phmap::flat_hash_set<uint32_t> attackedSet {};

std::map<uint8_t, OpenContainer> openContainers;
std::map<uint32_t, std::shared_ptr<DepotLocker>> depotLockerMap;
Expand Down
4 changes: 2 additions & 2 deletions src/game/movement/teleport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ void Teleport::serializeAttr(PropWriteStream &propWriteStream) const {
propWriteStream.write<uint8_t>(destPos.z);
}

ReturnValue Teleport::queryAdd(int32_t, const std::shared_ptr<Thing> &, uint32_t, uint32_t, const std::shared_ptr<Creature>&) {
ReturnValue Teleport::queryAdd(int32_t, const std::shared_ptr<Thing> &, uint32_t, uint32_t, const std::shared_ptr<Creature> &) {
return RETURNVALUE_NOTPOSSIBLE;
}

ReturnValue Teleport::queryMaxCount(int32_t, const std::shared_ptr<Thing> &, uint32_t, uint32_t &, uint32_t) {
return RETURNVALUE_NOTPOSSIBLE;
}

ReturnValue Teleport::queryRemove(const std::shared_ptr<Thing> &, uint32_t, uint32_t, const std::shared_ptr<Creature>& /*= nullptr */) {
ReturnValue Teleport::queryRemove(const std::shared_ptr<Thing> &, uint32_t, uint32_t, const std::shared_ptr<Creature> & /*= nullptr */) {
return RETURNVALUE_NOERROR;
}

Expand Down
2 changes: 1 addition & 1 deletion src/items/containers/depot/depotlocker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Attr_ReadValue DepotLocker::readAttr(AttrTypes_t attr, PropStream &propStream) {
return Item::readAttr(attr, propStream);
}

ReturnValue DepotLocker::queryAdd(int32_t, const std::shared_ptr<Thing> &, uint32_t, uint32_t, const std::shared_ptr<Creature>&) {
ReturnValue DepotLocker::queryAdd(int32_t, const std::shared_ptr<Thing> &, uint32_t, uint32_t, const std::shared_ptr<Creature> &) {
return RETURNVALUE_NOTENOUGHROOM;
}

Expand Down
2 changes: 1 addition & 1 deletion src/items/containers/inbox/inbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Inbox::Inbox(uint16_t type) :
maxInboxItems = std::numeric_limits<uint16_t>::max();
}

ReturnValue Inbox::queryAdd(int32_t, const std::shared_ptr<Thing> &thing, uint32_t, uint32_t flags, const std::shared_ptr<Creature>&) {
ReturnValue Inbox::queryAdd(int32_t, const std::shared_ptr<Thing> &thing, uint32_t, uint32_t flags, const std::shared_ptr<Creature> &) {
int32_t addCount = 0;

if (!hasBitSet(FLAG_NOLIMIT, flags)) {
Expand Down
4 changes: 2 additions & 2 deletions src/items/containers/mailbox/mailbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "game/scheduling/save_manager.hpp"
#include "map/spectators.hpp"

ReturnValue Mailbox::queryAdd(int32_t, const std::shared_ptr<Thing> &thing, uint32_t, uint32_t, const std::shared_ptr<Creature>&) {
ReturnValue Mailbox::queryAdd(int32_t, const std::shared_ptr<Thing> &thing, uint32_t, uint32_t, const std::shared_ptr<Creature> &) {
const auto item = thing->getItem();
if (item && Mailbox::canSend(item)) {
return RETURNVALUE_NOERROR;
Expand All @@ -28,7 +28,7 @@ ReturnValue Mailbox::queryMaxCount(int32_t, const std::shared_ptr<Thing> &, uint
return RETURNVALUE_NOERROR;
}

ReturnValue Mailbox::queryRemove(const std::shared_ptr<Thing> &, uint32_t, uint32_t, const std::shared_ptr<Creature>& /*= nullptr */) {
ReturnValue Mailbox::queryRemove(const std::shared_ptr<Thing> &, uint32_t, uint32_t, const std::shared_ptr<Creature> & /*= nullptr */) {
return RETURNVALUE_NOTPOSSIBLE;
}

Expand Down
2 changes: 1 addition & 1 deletion src/items/cylinder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class VirtualCylinder final : public Cylinder {
public:
static std::shared_ptr<VirtualCylinder> virtualCylinder;

virtual ReturnValue queryAdd(int32_t, const std::shared_ptr<Thing> &, uint32_t, uint32_t, const std::shared_ptr<Creature>& = nullptr) override {
virtual ReturnValue queryAdd(int32_t, const std::shared_ptr<Thing> &, uint32_t, uint32_t, const std::shared_ptr<Creature> & = nullptr) override {
return RETURNVALUE_NOTPOSSIBLE;
}
virtual ReturnValue queryMaxCount(int32_t, const std::shared_ptr<Thing> &, uint32_t, uint32_t &, uint32_t) override {
Expand Down
4 changes: 2 additions & 2 deletions src/items/tile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ void Tile::onUpdateTile(const CreatureVector &spectators) {
}
}

ReturnValue Tile::queryAdd(int32_t, const std::shared_ptr<Thing> &thing, uint32_t, uint32_t tileFlags, const std::shared_ptr<Creature>&) {
ReturnValue Tile::queryAdd(int32_t, const std::shared_ptr<Thing> &thing, uint32_t, uint32_t tileFlags, const std::shared_ptr<Creature> &) {
if (hasBitSet(FLAG_NOLIMIT, tileFlags)) {
return RETURNVALUE_NOERROR;
}
Expand Down Expand Up @@ -849,7 +849,7 @@ ReturnValue Tile::queryMaxCount(int32_t, const std::shared_ptr<Thing> &, uint32_
return RETURNVALUE_NOERROR;
}

ReturnValue Tile::queryRemove(const std::shared_ptr<Thing> &thing, uint32_t count, uint32_t tileFlags, const std::shared_ptr<Creature>& /*= nullptr */) {
ReturnValue Tile::queryRemove(const std::shared_ptr<Thing> &thing, uint32_t count, uint32_t tileFlags, const std::shared_ptr<Creature> & /*= nullptr */) {
int32_t index = getThingIndex(thing);
if (index == -1) {
return RETURNVALUE_NOTPOSSIBLE;
Expand Down
2 changes: 1 addition & 1 deletion src/items/trashholder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ReturnValue TrashHolder::queryMaxCount(int32_t, const std::shared_ptr<Thing> &,
return RETURNVALUE_NOERROR;
}

ReturnValue TrashHolder::queryRemove(const std::shared_ptr<Thing> &, uint32_t, uint32_t, const std::shared_ptr<Creature>& /*= nullptr */) {
ReturnValue TrashHolder::queryRemove(const std::shared_ptr<Thing> &, uint32_t, uint32_t, const std::shared_ptr<Creature> & /*= nullptr */) {
return RETURNVALUE_NOTPOSSIBLE;
}

Expand Down

0 comments on commit b954f4f

Please sign in to comment.