summaryrefslogtreecommitdiff
path: root/include/libcamera/signal.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-01-04 06:03:47 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-01-07 22:29:38 +0200
commitdce6bb0e301a7985b302143ff4405b5526ab5dd6 (patch)
tree12b20bc13a73ee5dc34114e538ec54dadbc01ca2 /include/libcamera/signal.h
parent3d1d2081714f316483dddf573105682910b026bc (diff)
libcamera: bound_method: Rename Bound*Method to BoundMethod*
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 <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'include/libcamera/signal.h')
-rw-r--r--include/libcamera/signal.h12
1 files changed, 6 insertions, 6 deletions
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<Object *>(obj);
object->connect(this);
- slots_.push_back(new BoundMemberMethod<T, void, Args...>(obj, object, func, type));
+ slots_.push_back(new BoundMethodMember<T, void, Args...>(obj, object, func, type));
}
template<typename T, typename R, typename std::enable_if<!std::is_base_of<Object, T>::value>::type * = nullptr>
@@ -69,13 +69,13 @@ public:
#endif
void connect(T *obj, R (T::*func)(Args...))
{
- slots_.push_back(new BoundMemberMethod<T, R, Args...>(obj, nullptr, func));
+ slots_.push_back(new BoundMethodMember<T, R, Args...>(obj, nullptr, func));
}
template<typename R>
void connect(R (*func)(Args...))
{
- slots_.push_back(new BoundStaticMethod<R, Args...>(func));
+ slots_.push_back(new BoundMethodStatic<R, Args...>(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<T, Args...> to match
+ * cast it to BoundMethodMember<T, Args...> to match
* func.
*/
if (slot->match(obj) &&
- static_cast<BoundMemberMethod<T, R, Args...> *>(slot)->match(func)) {
+ static_cast<BoundMethodMember<T, R, Args...> *>(slot)->match(func)) {
iter = slots_.erase(iter);
delete slot;
} else {
@@ -119,7 +119,7 @@ public:
for (auto iter = slots_.begin(); iter != slots_.end(); ) {
BoundMethodArgs<R, Args...> *slot = *iter;
if (slot->match(nullptr) &&
- static_cast<BoundStaticMethod<R, Args...> *>(slot)->match(func)) {
+ static_cast<BoundMethodStatic<R, Args...> *>(slot)->match(func)) {
iter = slots_.erase(iter);
delete slot;
} else {