summaryrefslogtreecommitdiff
path: root/include/libcamera/object.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-01-04 05:52:00 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-01-07 22:29:21 +0200
commita915a65fab5b202b51fadf585797384adb7f6b0c (patch)
tree90e9b9685ee00c6e71c9e8f9e341c0100848cb27 /include/libcamera/object.h
parentd82b8778ed4fa9cf0f2ccacc95807c1bdaa25bda (diff)
libcamera: object: Use activate() in invokeMethod()
The Object::invokeMethod() implementation duplicates pack creation code from BoundMemberMethod::activate(). Call activate() instead of activatePack() to share code. 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.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/include/libcamera/object.h b/include/libcamera/object.h
index 21b70460..c45165de 100644
--- a/include/libcamera/object.h
+++ b/include/libcamera/object.h
@@ -35,11 +35,8 @@ public:
Args... args)
{
T *obj = static_cast<T *>(this);
- BoundMethodBase *method =
- new BoundMemberMethod<T, FuncArgs...>(obj, this, func, type);
- void *pack = new typename BoundMemberMethod<T, FuncArgs...>::PackType{ args... };
-
- method->activatePack(pack, true);
+ auto *method = new BoundMemberMethod<T, FuncArgs...>(obj, this, func, type);
+ method->activate(args..., true);
}
Thread *thread() const { return thread_; }