Message ID | 20190115151849.1547-6-laurent.pinchart@ideasonboard.com |
---|---|
State | Accepted |
Headers | show |
Series |
|
Related | show |
Hi Laurent, Thanks for your work. On 2019-01-15 17:18:46 +0200, Laurent Pinchart wrote: > The EventDispatcherPoll::processNotifiers() function doesn't modify the > argument it receives, make it const. > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> > --- > src/libcamera/event_dispatcher_poll.cpp | 2 +- > src/libcamera/include/event_dispatcher_poll.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/libcamera/event_dispatcher_poll.cpp b/src/libcamera/event_dispatcher_poll.cpp > index a497a7fe9177..69edfcbf2725 100644 > --- a/src/libcamera/event_dispatcher_poll.cpp > +++ b/src/libcamera/event_dispatcher_poll.cpp > @@ -173,7 +173,7 @@ short EventDispatcherPoll::EventNotifierSetPoll::events() const > return events; > } > > -void EventDispatcherPoll::processNotifiers(std::vector<struct pollfd> &pollfds) > +void EventDispatcherPoll::processNotifiers(const std::vector<struct pollfd> &pollfds) > { > static const struct { > EventNotifier::Type type; > diff --git a/src/libcamera/include/event_dispatcher_poll.h b/src/libcamera/include/event_dispatcher_poll.h > index 30fd58506d6b..a41926e11a11 100644 > --- a/src/libcamera/include/event_dispatcher_poll.h > +++ b/src/libcamera/include/event_dispatcher_poll.h > @@ -41,7 +41,7 @@ private: > std::map<int, EventNotifierSetPoll> notifiers_; > std::list<Timer *> timers_; > > - void processNotifiers(std::vector<struct pollfd> &pollfds); > + void processNotifiers(const std::vector<struct pollfd> &pollfds); > void processTimers(); > }; > > -- > Regards, > > Laurent Pinchart > > _______________________________________________ > libcamera-devel mailing list > libcamera-devel@lists.libcamera.org > https://lists.libcamera.org/listinfo/libcamera-devel
diff --git a/src/libcamera/event_dispatcher_poll.cpp b/src/libcamera/event_dispatcher_poll.cpp index a497a7fe9177..69edfcbf2725 100644 --- a/src/libcamera/event_dispatcher_poll.cpp +++ b/src/libcamera/event_dispatcher_poll.cpp @@ -173,7 +173,7 @@ short EventDispatcherPoll::EventNotifierSetPoll::events() const return events; } -void EventDispatcherPoll::processNotifiers(std::vector<struct pollfd> &pollfds) +void EventDispatcherPoll::processNotifiers(const std::vector<struct pollfd> &pollfds) { static const struct { EventNotifier::Type type; diff --git a/src/libcamera/include/event_dispatcher_poll.h b/src/libcamera/include/event_dispatcher_poll.h index 30fd58506d6b..a41926e11a11 100644 --- a/src/libcamera/include/event_dispatcher_poll.h +++ b/src/libcamera/include/event_dispatcher_poll.h @@ -41,7 +41,7 @@ private: std::map<int, EventNotifierSetPoll> notifiers_; std::list<Timer *> timers_; - void processNotifiers(std::vector<struct pollfd> &pollfds); + void processNotifiers(const std::vector<struct pollfd> &pollfds); void processTimers(); };
The EventDispatcherPoll::processNotifiers() function doesn't modify the argument it receives, make it const. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> --- src/libcamera/event_dispatcher_poll.cpp | 2 +- src/libcamera/include/event_dispatcher_poll.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)