apps: common: event_loop: Disable copy/move
The compiler generated functions are not appropriate, so delete the copy/move constructor/assignment to avoid potential issues. Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
This commit is contained in:
parent
b1b99f4d66
commit
a0f4092c6c
1 changed files with 5 additions and 0 deletions
|
@ -13,6 +13,8 @@
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
|
|
||||||
|
#include <libcamera/base/class.h>
|
||||||
|
|
||||||
#include <event2/util.h>
|
#include <event2/util.h>
|
||||||
|
|
||||||
struct event_base;
|
struct event_base;
|
||||||
|
@ -43,8 +45,11 @@ public:
|
||||||
std::function<void()> &&handler);
|
std::function<void()> &&handler);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
LIBCAMERA_DISABLE_COPY_AND_MOVE(EventLoop)
|
||||||
|
|
||||||
struct Event {
|
struct Event {
|
||||||
Event(std::function<void()> &&callback);
|
Event(std::function<void()> &&callback);
|
||||||
|
LIBCAMERA_DISABLE_COPY_AND_MOVE(Event)
|
||||||
~Event();
|
~Event();
|
||||||
|
|
||||||
static void dispatch(int fd, short events, void *arg);
|
static void dispatch(int fd, short events, void *arg);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue