From 1715b7ed089a8c3009ca39e0bd3081da217c61bc Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 28 Jul 2022 13:34:55 +0300 Subject: 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 Signed-off-by: Laurent Pinchart Reviewed-by: Umang Jain Reviewed-by: Jacopo Mondi --- include/libcamera/base/bound_method.h | 2 +- include/libcamera/base/flags.h | 8 ++--- include/libcamera/base/object.h | 2 +- include/libcamera/base/signal.h | 8 ++--- include/libcamera/controls.h | 38 ++++++++++++------------ include/libcamera/internal/ipa_data_serializer.h | 2 +- include/libcamera/internal/yaml_parser.h | 4 +-- 7 files changed, 32 insertions(+), 32 deletions(-) (limited to 'include/libcamera') 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::value> * = nullptr> + template::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 std::enable_if_t::enable, Flags> +std::enable_if_t::enable, Flags> operator|(E lhs, E rhs) { using type = std::underlying_type_t; @@ -155,7 +155,7 @@ operator|(E lhs, E rhs) } template -typename std::enable_if_t::enable, Flags> +std::enable_if_t::enable, Flags> operator&(E lhs, E rhs) { using type = std::underlying_type_t; @@ -163,7 +163,7 @@ operator&(E lhs, E rhs) } template -typename std::enable_if_t::enable, Flags> +std::enable_if_t::enable, Flags> operator^(E lhs, E rhs) { using type = std::underlying_type_t; @@ -171,7 +171,7 @@ operator^(E lhs, E rhs) } template -typename std::enable_if_t::enable, Flags> +std::enable_if_t::enable, Flags> operator~(E rhs) { using type = std::underlying_type_t; 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 msg); template::value> * = nullptr> + std::enable_if_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::value> * = nullptr> + template::value> * = nullptr> void connect(T *obj, R (T::*func)(Args...), ConnectionType type = ConnectionTypeAuto) { @@ -52,7 +52,7 @@ public: SignalBase::connect(new BoundMethodMember(obj, object, func, type)); } - template::value> * = nullptr> + template::value> * = nullptr> #else template #endif @@ -63,7 +63,7 @@ public: #ifndef __DOXYGEN__ template::value> * = nullptr> + std::enable_if_t::value> * = nullptr> void connect(T *obj, Func func, ConnectionType type = ConnectionTypeAuto) { Object *object = static_cast(obj); @@ -71,7 +71,7 @@ public: } template::value> * = nullptr> + std::enable_if_t::value> * = nullptr> #else template #endif diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h index 7920abba..b1b52acb 100644 --- a/include/libcamera/controls.h +++ b/include/libcamera/controls.h @@ -99,10 +99,10 @@ public: ControlValue(); #ifndef __DOXYGEN__ - template::value && - details::control_type::value && - !std::is_same>::value, - std::nullptr_t> = nullptr> + template::value && + details::control_type::value && + !std::is_same>::value, + std::nullptr_t> = nullptr> ControlValue(const T &value) : type_(ControlTypeNone), numElements_(0) { @@ -110,9 +110,9 @@ public: &value, 1, sizeof(T)); } - template::value || - std::is_same>::value, - std::nullptr_t> = nullptr> + template::value || + std::is_same>::value, + std::nullptr_t> = nullptr> #else template #endif @@ -144,9 +144,9 @@ public: } #ifndef __DOXYGEN__ - template::value && - !std::is_same>::value, - std::nullptr_t> = nullptr> + template::value && + !std::is_same>::value, + std::nullptr_t> = nullptr> T get() const { assert(type_ == details::control_type>::value); @@ -155,9 +155,9 @@ public: return *reinterpret_cast(data().data()); } - template::value || - std::is_same>::value, - std::nullptr_t> = nullptr> + template::value || + std::is_same>::value, + std::nullptr_t> = nullptr> #else template #endif @@ -172,18 +172,18 @@ public: } #ifndef __DOXYGEN__ - template::value && - !std::is_same>::value, - std::nullptr_t> = nullptr> + template::value && + !std::is_same>::value, + std::nullptr_t> = nullptr> void set(const T &value) { set(details::control_type>::value, false, reinterpret_cast(&value), 1, sizeof(T)); } - template::value || - std::is_same>::value, - std::nullptr_t> = nullptr> + template::value || + std::is_same>::value, + std::nullptr_t> = nullptr> #else template #endif diff --git a/include/libcamera/internal/ipa_data_serializer.h b/include/libcamera/internal/ipa_data_serializer.h index a87449c9..30bdaebc 100644 --- a/include/libcamera/internal/ipa_data_serializer.h +++ b/include/libcamera/internal/ipa_data_serializer.h @@ -32,7 +32,7 @@ LOG_DECLARE_CATEGORY(IPADataSerializer) namespace { template> * = nullptr> + std::enable_if_t> * = nullptr> void appendPOD(std::vector &vec, T val) { constexpr size_t byteWidth = sizeof(val); diff --git a/include/libcamera/internal/yaml_parser.h b/include/libcamera/internal/yaml_parser.h index 78c359f7..5ba777d3 100644 --- a/include/libcamera/internal/yaml_parser.h +++ b/include/libcamera/internal/yaml_parser.h @@ -163,7 +163,7 @@ public: #ifndef __DOXYGEN__ template || std::is_same_v || std::is_same_v || @@ -185,7 +185,7 @@ public: #ifndef __DOXYGEN__ template || std::is_same_v || std::is_same_v || -- cgit v1.2.1