libcamera: Don't use emitter object pointer argument to slot

In many cases, the emitter object passed as a pointer from signals to
slots is also available as a class member. Use the class member when
this occurs, to prepare for removal of the emitter object pointer from
signals.

In test/event.cpp, this additionally requires moving the EventNotifier
to a class member.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
This commit is contained in:
Laurent Pinchart 2021-08-27 04:41:05 +03:00
parent 58720e1dc9
commit 3f662ae3c0
7 changed files with 25 additions and 20 deletions

View file

@ -68,12 +68,12 @@ public:
}
private:
void readyRead(IPCUnixSocket *ipc)
void readyRead([[maybe_unused]] IPCUnixSocket *ipc)
{
IPCUnixSocket::Payload message, response;
int ret;
ret = ipc->receive(&message);
ret = ipc_.receive(&message);
if (ret) {
cerr << "Receive message failed: " << ret << endl;
return;
@ -447,14 +447,14 @@ private:
return 0;
}
void readyRead(IPCUnixSocket *ipc)
void readyRead([[maybe_unused]] IPCUnixSocket *ipc)
{
if (!callResponse_) {
cerr << "Read ready without expecting data, fail." << endl;
return;
}
if (ipc->receive(callResponse_)) {
if (ipc_.receive(callResponse_)) {
cerr << "Receive message failed" << endl;
return;
}

View file

@ -65,12 +65,12 @@ public:
}
private:
void readyRead(IPCUnixSocket *ipc)
void readyRead([[maybe_unused]] IPCUnixSocket *ipc)
{
IPCUnixSocket::Payload message;
int ret;
ret = ipc->receive(&message);
ret = ipc_.receive(&message);
if (ret) {
cerr << "Receive message failed: " << ret << endl;
return;