From dce6bb0e301a7985b302143ff4405b5526ab5dd6 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sat, 4 Jan 2020 06:03:47 +0200 Subject: libcamera: bound_method: Rename Bound*Method to BoundMethod* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Most of the bound method classes are named with a BoundMethod prefix, except for BoundMemberMethod and BoundStaticMethod. Rename them to BoundMethodMember and BoundMethodStatic respectively to make the code more coherent. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- include/libcamera/bound_method.h | 12 ++++++------ include/libcamera/object.h | 2 +- include/libcamera/signal.h | 12 ++++++------ 3 files changed, 13 insertions(+), 13 deletions(-) (limited to 'include/libcamera') diff --git a/include/libcamera/bound_method.h b/include/libcamera/bound_method.h index 0a91f44a..ca501493 100644 --- a/include/libcamera/bound_method.h +++ b/include/libcamera/bound_method.h @@ -156,12 +156,12 @@ public: }; template -class BoundMemberMethod : public BoundMethodArgs +class BoundMethodMember : public BoundMethodArgs { public: using PackType = typename BoundMethodArgs::PackType; - BoundMemberMethod(T *obj, Object *object, R (T::*func)(Args...), + BoundMethodMember(T *obj, Object *object, R (T::*func)(Args...), ConnectionType type = ConnectionTypeAuto) : BoundMethodArgs(obj, object, type), func_(func) { @@ -189,12 +189,12 @@ private: }; template -class BoundMemberMethod : public BoundMethodArgs +class BoundMethodMember : public BoundMethodArgs { public: using PackType = typename BoundMethodArgs::PackType; - BoundMemberMethod(T *obj, Object *object, void (T::*func)(Args...), + BoundMethodMember(T *obj, Object *object, void (T::*func)(Args...), ConnectionType type = ConnectionTypeAuto) : BoundMethodArgs(obj, object, type), func_(func) { @@ -221,10 +221,10 @@ private: }; template -class BoundStaticMethod : public BoundMethodArgs +class BoundMethodStatic : public BoundMethodArgs { public: - BoundStaticMethod(R (*func)(Args...)) + BoundMethodStatic(R (*func)(Args...)) : BoundMethodArgs(nullptr, nullptr, ConnectionTypeAuto), func_(func) { diff --git a/include/libcamera/object.h b/include/libcamera/object.h index 04aa1839..9344af30 100644 --- a/include/libcamera/object.h +++ b/include/libcamera/object.h @@ -35,7 +35,7 @@ public: Args... args) { T *obj = static_cast(this); - auto *method = new BoundMemberMethod(obj, this, func, type); + auto *method = new BoundMethodMember(obj, this, func, type); return method->activate(args..., true); } diff --git a/include/libcamera/signal.h b/include/libcamera/signal.h index 7fbe5a2c..432d95d0 100644 --- a/include/libcamera/signal.h +++ b/include/libcamera/signal.h @@ -60,7 +60,7 @@ public: { Object *object = static_cast(obj); object->connect(this); - slots_.push_back(new BoundMemberMethod(obj, object, func, type)); + slots_.push_back(new BoundMethodMember(obj, object, func, type)); } template::value>::type * = nullptr> @@ -69,13 +69,13 @@ public: #endif void connect(T *obj, R (T::*func)(Args...)) { - slots_.push_back(new BoundMemberMethod(obj, nullptr, func)); + slots_.push_back(new BoundMethodMember(obj, nullptr, func)); } template void connect(R (*func)(Args...)) { - slots_.push_back(new BoundStaticMethod(func)); + slots_.push_back(new BoundMethodStatic(func)); } void disconnect() @@ -100,11 +100,11 @@ public: /* * If the object matches the slot, the slot is * guaranteed to be a member slot, so we can safely - * cast it to BoundMemberMethod to match + * cast it to BoundMethodMember to match * func. */ if (slot->match(obj) && - static_cast *>(slot)->match(func)) { + static_cast *>(slot)->match(func)) { iter = slots_.erase(iter); delete slot; } else { @@ -119,7 +119,7 @@ public: for (auto iter = slots_.begin(); iter != slots_.end(); ) { BoundMethodArgs *slot = *iter; if (slot->match(nullptr) && - static_cast *>(slot)->match(func)) { + static_cast *>(slot)->match(func)) { iter = slots_.erase(iter); delete slot; } else { -- cgit v1.2.1