From 73a1bea709fd14cab11f35a99e9feaa98a42c3cc Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 8 Feb 2019 00:46:25 +0200 Subject: libcamera: signal: Fix coding style issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix issues reported by checkstyle.py in preparation for further changes. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- include/libcamera/signal.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'include') diff --git a/include/libcamera/signal.h b/include/libcamera/signal.h index c375b0a8..6e8b876e 100644 --- a/include/libcamera/signal.h +++ b/include/libcamera/signal.h @@ -20,8 +20,8 @@ class SlotBase { public: SlotBase(void *obj) - : obj_(obj) { } - virtual ~SlotBase() { } + : obj_(obj) {} + virtual ~SlotBase() {} virtual void invoke(Args... args) = 0; @@ -34,35 +34,35 @@ template class SlotMember : public SlotBase { public: - SlotMember(T *obj, void(T::*func)(Args...)) - : SlotBase(obj), func_(func) { } + SlotMember(T *obj, void (T::*func)(Args...)) + : SlotBase(obj), func_(func) {} void invoke(Args... args) { (static_cast(this->obj_)->*func_)(args...); } private: friend class Signal; - void(T::*func_)(Args...); + void (T::*func_)(Args...); }; template class SlotStatic : public SlotBase { public: - SlotStatic(void(*func)(Args...)) - : SlotBase(nullptr), func_(func) { } + SlotStatic(void (*func)(Args...)) + : SlotBase(nullptr), func_(func) {} void invoke(Args... args) { (*func_)(args...); } private: friend class Signal; - void(*func_)(Args...); + void (*func_)(Args...); }; template class Signal { public: - Signal() { } + Signal() {} ~Signal() { for (SlotBase *slot : slots_) @@ -70,12 +70,12 @@ public: } template - void connect(T *object, void(T::*func)(Args...)) + void connect(T *object, void (T::*func)(Args...)) { slots_.push_back(new SlotMember(object, func)); } - void connect(void(*func)(Args...)) + void connect(void (*func)(Args...)) { slots_.push_back(new SlotStatic(func)); } @@ -102,7 +102,7 @@ public: } template - void disconnect(T *object, void(T::*func)(Args...)) + void disconnect(T *object, void (T::*func)(Args...)) { for (auto iter = slots_.begin(); iter != slots_.end(); ) { SlotBase *slot = *iter; @@ -120,7 +120,7 @@ public: } } - void disconnect(void(*func)(Args...)) + void disconnect(void (*func)(Args...)) { for (auto iter = slots_.begin(); iter != slots_.end(); ) { SlotBase *slot = *iter; -- cgit v1.2.1