Skip to content

Commit

Permalink
[src] Adjust format
Browse files Browse the repository at this point in the history
  • Loading branch information
Sigma711 committed Jul 9, 2023
1 parent 04c82ad commit 9249914
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/poller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ void Poller::RemoveEventer(Eventer* eventer) {

void Poller::GetActiveEventer(int event_amount,
EventerList* active_eventers) const {
for (int i = 0; i < event_amount; ++i) {
for (size_t i = 0; i < event_amount; ++i) {
auto eventer = static_cast<Eventer*>(poll_events_[i].data.ptr);
eventer->ReceiveEvents(poll_events_[i].events);
active_eventers->emplace_back(eventer);
Expand Down Expand Up @@ -244,7 +244,8 @@ void Poller::RemoveEventer(Eventer* eventer) {
poll_events_.pop_back();
}

void Poller::GetActiveEventer(int event_amount, const PollEventList active_events,
void Poller::GetActiveEventer(int event_amount,
const PollEventList active_events,
EventerList* active_eventers) const {
LockGuard lock_guard(event_lock_);
for (auto itr = active_events.cbegin();
Expand Down
3 changes: 2 additions & 1 deletion src/poller.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ class Poller : NonCopyableMovable {
typedef std::map<int, Eventer*> EventerMap;
typedef std::vector<struct pollfd> PollEventList;

void GetActiveEventer(int event_amount, const PollEventList active_events, EventerList* active_eventers) const;
void GetActiveEventer(int event_amount, const PollEventList active_events,
EventerList* active_eventers) const;

// Map for all file descriptors mapping to their corresponding "Eventer"s
EventerMap eventers_;
Expand Down

0 comments on commit 9249914

Please sign in to comment.