Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 26, 2024
1 parent 045d433 commit 6268e8c
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/mbgl/actor/mailbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,21 +151,21 @@ void Mailbox::push(std::unique_ptr<Message> message) {
}
}

void Mailbox::scheduleToRecieve(const std::optional<util::SimpleIdentity>& tag) {
auto guard = weakScheduler.lock();
if (weakScheduler) {
std::weak_ptr<Mailbox> mailbox = shared_from_this();
auto setToRecieve = [mbox = std::move(mailbox)]() {
if (auto locked = mbox.lock()) {
locked->receive();
}
};
if (tag) {
weakScheduler->schedule(*tag, std::move(setToRecieve));
} else {
weakScheduler->schedule(std::move(setToRecieve));
void Mailbox::scheduleToRecieve(const std::optional<util::SimpleIdentity>& tag) {
auto guard = weakScheduler.lock();
if (weakScheduler) {
std::weak_ptr<Mailbox> mailbox = shared_from_this();
auto setToRecieve = [mbox = std::move(mailbox)]() {
if (auto locked = mbox.lock()) {
locked->receive();
}
};
if (tag) {
weakScheduler->schedule(*tag, std::move(setToRecieve));
} else {
weakScheduler->schedule(std::move(setToRecieve));
}
}
}

} // namespace mbgl

0 comments on commit 6268e8c

Please sign in to comment.