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 Nov 20, 2024
1 parent 0fc601a commit 14deabf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/creatures/players/imbuements/imbuements.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ ImbuementDecay &ImbuementDecay::getInstance() {
return inject<ImbuementDecay>();
}

void ImbuementDecay::startImbuementDecay(const std::shared_ptr<Item>& item) {
void ImbuementDecay::startImbuementDecay(const std::shared_ptr<Item> &item) {
if (!item) {
g_logger().error("[{}] item is nullptr", __FUNCTION__);
return;
Expand All @@ -442,13 +442,13 @@ void ImbuementDecay::startImbuementDecay(const std::shared_ptr<Item>& item) {
if (m_eventId == 0) {
m_lastUpdateTime = OTSYS_TIME();
m_eventId = g_dispatcher().scheduleEvent(
60000, [this] { checkImbuementDecay(); }, "ImbuementDecay::checkImbuementDecay"
);
60000, [this] { checkImbuementDecay(); }, "ImbuementDecay::checkImbuementDecay"
);
g_logger().trace("Scheduled imbuement decay check every 60 seconds.");
}
}

void ImbuementDecay::stopImbuementDecay(const std::shared_ptr<Item>& item) {
void ImbuementDecay::stopImbuementDecay(const std::shared_ptr<Item> &item) {
if (!item) {
g_logger().error("[{}] item is nullptr", __FUNCTION__);
return;
Expand Down Expand Up @@ -494,7 +494,7 @@ void ImbuementDecay::checkImbuementDecay() {

std::vector<std::shared_ptr<Item>> itemsToRemove;

for (const auto& item : m_itemsToDecay) {
for (const auto &item : m_itemsToDecay) {
if (!item) {
g_logger().error("[{}] item is nullptr", __FUNCTION__);
itemsToRemove.push_back(item);
Expand Down Expand Up @@ -567,7 +567,7 @@ void ImbuementDecay::checkImbuementDecay() {
}

// Remove items whose imbuements have expired
for (const auto& item : itemsToRemove) {
for (const auto &item : itemsToRemove) {
m_itemsToDecay.erase(item);
}

Expand Down
6 changes: 3 additions & 3 deletions src/creatures/players/imbuements/imbuements.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,14 @@ class ImbuementDecay {

static ImbuementDecay &getInstance();

void startImbuementDecay(const std::shared_ptr<Item>& item);
void stopImbuementDecay(const std::shared_ptr<Item>& item);
void startImbuementDecay(const std::shared_ptr<Item> &item);
void stopImbuementDecay(const std::shared_ptr<Item> &item);
void checkImbuementDecay();

private:
std::unordered_set<std::shared_ptr<Item>> m_itemsToDecay;
int64_t m_lastUpdateTime = 0;
uint32_t m_eventId{0};
uint32_t m_eventId { 0 };
};

constexpr auto g_imbuementDecay = ImbuementDecay::getInstance;

0 comments on commit 14deabf

Please sign in to comment.