Message ID | 20220616142403.20723-2-laurent.pinchart@ideasonboard.com |
---|---|
State | Accepted |
Headers | show |
Series |
|
Related | show |
Hi Laurent On Thu, Jun 16, 2022 at 05:23:57PM +0300, Laurent Pinchart via libcamera-devel wrote: > As the YamlObject class is internal to libcamera, it can use the full > C++17 API. Replace std::is_same<>::value with std::is_same_v<>. > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Thanks j > --- > include/libcamera/internal/yaml_parser.h | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/include/libcamera/internal/yaml_parser.h b/include/libcamera/internal/yaml_parser.h > index be5f0914703f..29b7b218f0d9 100644 > --- a/include/libcamera/internal/yaml_parser.h > +++ b/include/libcamera/internal/yaml_parser.h > @@ -44,12 +44,12 @@ public: > #ifndef __DOXYGEN__ > template<typename T, > typename std::enable_if_t< > - std::is_same<bool, T>::value || > - std::is_same<double, T>::value || > - std::is_same<int32_t, T>::value || > - std::is_same<uint32_t, T>::value || > - std::is_same<std::string, T>::value || > - std::is_same<Size, T>::value> * = nullptr> > + std::is_same_v<bool, T> || > + std::is_same_v<double, T> || > + std::is_same_v<int32_t, T> || > + std::is_same_v<uint32_t, T> || > + std::is_same_v<std::string, T> || > + std::is_same_v<Size, T>> * = nullptr> > #else > template<typename T> > #endif > -- > Regards, > > Laurent Pinchart >
Hi Laurent, Reviewed-by: Han-Lin Chen <hanlinchen@chromium.org> Thanks. On Thu, Jun 16, 2022 at 10:24 PM Laurent Pinchart via libcamera-devel <libcamera-devel@lists.libcamera.org> wrote: > > As the YamlObject class is internal to libcamera, it can use the full > C++17 API. Replace std::is_same<>::value with std::is_same_v<>. > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > include/libcamera/internal/yaml_parser.h | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/include/libcamera/internal/yaml_parser.h b/include/libcamera/internal/yaml_parser.h > index be5f0914703f..29b7b218f0d9 100644 > --- a/include/libcamera/internal/yaml_parser.h > +++ b/include/libcamera/internal/yaml_parser.h > @@ -44,12 +44,12 @@ public: > #ifndef __DOXYGEN__ > template<typename T, > typename std::enable_if_t< > - std::is_same<bool, T>::value || > - std::is_same<double, T>::value || > - std::is_same<int32_t, T>::value || > - std::is_same<uint32_t, T>::value || > - std::is_same<std::string, T>::value || > - std::is_same<Size, T>::value> * = nullptr> > + std::is_same_v<bool, T> || > + std::is_same_v<double, T> || > + std::is_same_v<int32_t, T> || > + std::is_same_v<uint32_t, T> || > + std::is_same_v<std::string, T> || > + std::is_same_v<Size, T>> * = nullptr> > #else > template<typename T> > #endif > -- > Regards, > > Laurent Pinchart >
diff --git a/include/libcamera/internal/yaml_parser.h b/include/libcamera/internal/yaml_parser.h index be5f0914703f..29b7b218f0d9 100644 --- a/include/libcamera/internal/yaml_parser.h +++ b/include/libcamera/internal/yaml_parser.h @@ -44,12 +44,12 @@ public: #ifndef __DOXYGEN__ template<typename T, typename std::enable_if_t< - std::is_same<bool, T>::value || - std::is_same<double, T>::value || - std::is_same<int32_t, T>::value || - std::is_same<uint32_t, T>::value || - std::is_same<std::string, T>::value || - std::is_same<Size, T>::value> * = nullptr> + std::is_same_v<bool, T> || + std::is_same_v<double, T> || + std::is_same_v<int32_t, T> || + std::is_same_v<uint32_t, T> || + std::is_same_v<std::string, T> || + std::is_same_v<Size, T>> * = nullptr> #else template<typename T> #endif
As the YamlObject class is internal to libcamera, it can use the full C++17 API. Replace std::is_same<>::value with std::is_same_v<>. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> --- include/libcamera/internal/yaml_parser.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)