summaryrefslogtreecommitdiff
path: root/include/libcamera/base
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-07-28 13:34:55 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-07-28 18:47:17 +0300
commit1715b7ed089a8c3009ca39e0bd3081da217c61bc (patch)
tree1fb53fbb8161966d4110d9e03939ea35c43c446e /include/libcamera/base
parentc19150ea94ac095de63fe878282caf3b23dd461f (diff)
libcamera: Drop unnecessary typename keyword used with std::enable_if_t
Usage of the std::enable_if_t type doesn't need to be prefixed by typename. Drop the unnecessary keyword. Reported-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'include/libcamera/base')
-rw-r--r--include/libcamera/base/bound_method.h2
-rw-r--r--include/libcamera/base/flags.h8
-rw-r--r--include/libcamera/base/object.h2
-rw-r--r--include/libcamera/base/signal.h8
4 files changed, 10 insertions, 10 deletions
diff --git a/include/libcamera/base/bound_method.h b/include/libcamera/base/bound_method.h
index e73a4d98..c0275249 100644
--- a/include/libcamera/base/bound_method.h
+++ b/include/libcamera/base/bound_method.h
@@ -72,7 +72,7 @@ public:
}
virtual ~BoundMethodBase() = default;
- template<typename T, typename std::enable_if_t<!std::is_same<Object, T>::value> * = nullptr>
+ template<typename T, std::enable_if_t<!std::is_same<Object, T>::value> * = nullptr>
bool match(T *obj) { return obj == obj_; }
bool match(Object *object) { return object == object_; }
diff --git a/include/libcamera/base/flags.h b/include/libcamera/base/flags.h
index bff3b93c..a1b404bd 100644
--- a/include/libcamera/base/flags.h
+++ b/include/libcamera/base/flags.h
@@ -147,7 +147,7 @@ struct flags_enable_operators {
};
template<typename E>
-typename std::enable_if_t<flags_enable_operators<E>::enable, Flags<E>>
+std::enable_if_t<flags_enable_operators<E>::enable, Flags<E>>
operator|(E lhs, E rhs)
{
using type = std::underlying_type_t<E>;
@@ -155,7 +155,7 @@ operator|(E lhs, E rhs)
}
template<typename E>
-typename std::enable_if_t<flags_enable_operators<E>::enable, Flags<E>>
+std::enable_if_t<flags_enable_operators<E>::enable, Flags<E>>
operator&(E lhs, E rhs)
{
using type = std::underlying_type_t<E>;
@@ -163,7 +163,7 @@ operator&(E lhs, E rhs)
}
template<typename E>
-typename std::enable_if_t<flags_enable_operators<E>::enable, Flags<E>>
+std::enable_if_t<flags_enable_operators<E>::enable, Flags<E>>
operator^(E lhs, E rhs)
{
using type = std::underlying_type_t<E>;
@@ -171,7 +171,7 @@ operator^(E lhs, E rhs)
}
template<typename E>
-typename std::enable_if_t<flags_enable_operators<E>::enable, Flags<E>>
+std::enable_if_t<flags_enable_operators<E>::enable, Flags<E>>
operator~(E rhs)
{
using type = std::underlying_type_t<E>;
diff --git a/include/libcamera/base/object.h b/include/libcamera/base/object.h
index eef1a2c9..93333636 100644
--- a/include/libcamera/base/object.h
+++ b/include/libcamera/base/object.h
@@ -32,7 +32,7 @@ public:
void postMessage(std::unique_ptr<Message> msg);
template<typename T, typename R, typename... FuncArgs, typename... Args,
- typename std::enable_if_t<std::is_base_of<Object, T>::value> * = nullptr>
+ std::enable_if_t<std::is_base_of<Object, T>::value> * = nullptr>
R invokeMethod(R (T::*func)(FuncArgs...), ConnectionType type,
Args&&... args)
{
diff --git a/include/libcamera/base/signal.h b/include/libcamera/base/signal.h
index 91000d0d..efb591bc 100644
--- a/include/libcamera/base/signal.h
+++ b/include/libcamera/base/signal.h
@@ -44,7 +44,7 @@ public:
}
#ifndef __DOXYGEN__
- template<typename T, typename R, typename std::enable_if_t<std::is_base_of<Object, T>::value> * = nullptr>
+ template<typename T, typename R, std::enable_if_t<std::is_base_of<Object, T>::value> * = nullptr>
void connect(T *obj, R (T::*func)(Args...),
ConnectionType type = ConnectionTypeAuto)
{
@@ -52,7 +52,7 @@ public:
SignalBase::connect(new BoundMethodMember<T, R, Args...>(obj, object, func, type));
}
- template<typename T, typename R, typename std::enable_if_t<!std::is_base_of<Object, T>::value> * = nullptr>
+ template<typename T, typename R, std::enable_if_t<!std::is_base_of<Object, T>::value> * = nullptr>
#else
template<typename T, typename R>
#endif
@@ -63,7 +63,7 @@ public:
#ifndef __DOXYGEN__
template<typename T, typename Func,
- typename std::enable_if_t<std::is_base_of<Object, T>::value> * = nullptr>
+ std::enable_if_t<std::is_base_of<Object, T>::value> * = nullptr>
void connect(T *obj, Func func, ConnectionType type = ConnectionTypeAuto)
{
Object *object = static_cast<Object *>(obj);
@@ -71,7 +71,7 @@ public:
}
template<typename T, typename Func,
- typename std::enable_if_t<!std::is_base_of<Object, T>::value> * = nullptr>
+ std::enable_if_t<!std::is_base_of<Object, T>::value> * = nullptr>
#else
template<typename T, typename Func>
#endif