summaryrefslogtreecommitdiff
path: root/include/libcamera/object.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-10-28 05:44:14 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-10-29 16:44:45 +0200
commit06008b9156b74885aa2382dec9dc8c7854ca6f2e (patch)
treeb9ad44960cab2045a41c58bd20b68e1be9b7ab4d /include/libcamera/object.h
parent8524e6261175549575d3bf82bcce31cb615a5717 (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 'include/libcamera/object.h')
-rw-r--r--include/libcamera/object.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/libcamera/object.h b/include/libcamera/object.h
index 3308330a..603a2292 100644
--- a/include/libcamera/object.h
+++ b/include/libcamera/object.h
@@ -33,10 +33,12 @@ public:
void invokeMethod(void (T::*func)(Args...), Args... args)
{
T *obj = static_cast<T *>(this);
- BoundMethodBase *method = new BoundMemberMethod<T, Args...>(obj, this, func);
+ BoundMethodBase *method =
+ new BoundMemberMethod<T, Args...>(obj, this, func,
+ ConnectionTypeQueued);
void *pack = new typename BoundMemberMethod<T, Args...>::PackType{ args... };
- invokeMethod(method, pack);
+ method->activatePack(pack, true);
}
Thread *thread() const { return thread_; }
@@ -53,8 +55,6 @@ private:
friend class BoundMethodBase;
friend class Thread;
- void invokeMethod(BoundMethodBase *method, void *pack);
-
void notifyThreadMove();
void connect(SignalBase *signal);