diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-10-28 05:44:14 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-10-29 16:44:45 +0200 |
commit | 06008b9156b74885aa2382dec9dc8c7854ca6f2e (patch) | |
tree | b9ad44960cab2045a41c58bd20b68e1be9b7ab4d /src/libcamera/bound_method.cpp | |
parent | 8524e6261175549575d3bf82bcce31cb615a5717 (diff) |
libcamera: object: Use bound method activePack() for invokeMethod()
The BoundMethodBase::activatePack() and the internal
Object::invokeMethod() are duplicate implementation of the same
mechanism. Use the former to replace the latter.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src/libcamera/bound_method.cpp')
-rw-r--r-- | src/libcamera/bound_method.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcamera/bound_method.cpp b/src/libcamera/bound_method.cpp index 60071736..4c0cd415 100644 --- a/src/libcamera/bound_method.cpp +++ b/src/libcamera/bound_method.cpp @@ -48,7 +48,7 @@ namespace libcamera { * deadlock will occur. */ -void BoundMethodBase::activatePack(void *pack) +void BoundMethodBase::activatePack(void *pack, bool deleteMethod) { ConnectionType type = connectionType_; if (type == ConnectionTypeAuto) { @@ -66,7 +66,7 @@ void BoundMethodBase::activatePack(void *pack) case ConnectionTypeQueued: { std::unique_ptr<Message> msg = - utils::make_unique<InvokeMessage>(this, pack); + utils::make_unique<InvokeMessage>(this, pack, nullptr, deleteMethod); object_->postMessage(std::move(msg)); break; } @@ -75,7 +75,7 @@ void BoundMethodBase::activatePack(void *pack) Semaphore semaphore; std::unique_ptr<Message> msg = - utils::make_unique<InvokeMessage>(this, pack, &semaphore); + utils::make_unique<InvokeMessage>(this, pack, &semaphore, deleteMethod); object_->postMessage(std::move(msg)); semaphore.acquire(); |