summaryrefslogtreecommitdiff
path: root/src/libcamera/ipa_module.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-02-16 02:10:10 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-02-18 02:15:25 +0200
commitb5eff18f1aef980fa7eb55184996710a6fc9523e (patch)
tree65625ff6322213128f7311e278dd5d48d63a83b7 /src/libcamera/ipa_module.cpp
parent68daa9302f90833ce345cb33ffcf075f23cbfc9a (diff)
libcamera: Use C++14 std::*_t type traits
C++14 introduced useful type traits helpers named std::*_t as aliases to std::*<...>::type. Use them to simplify the code. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src/libcamera/ipa_module.cpp')
-rw-r--r--src/libcamera/ipa_module.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp
index de65525b..a01d0757 100644
--- a/src/libcamera/ipa_module.cpp
+++ b/src/libcamera/ipa_module.cpp
@@ -42,20 +42,20 @@ LOG_DEFINE_CATEGORY(IPAModule)
namespace {
template<typename T>
-typename std::remove_extent<T>::type *elfPointer(void *map, off_t offset,
- size_t fileSize, size_t objSize)
+typename std::remove_extent_t<T> *elfPointer(void *map, off_t offset,
+ size_t fileSize, size_t objSize)
{
size_t size = offset + objSize;
if (size > fileSize || size < objSize)
return nullptr;
- return reinterpret_cast<typename std::remove_extent<T>::type *>
+ return reinterpret_cast<typename std::remove_extent_t<T> *>
(static_cast<char *>(map) + offset);
}
template<typename T>
-typename std::remove_extent<T>::type *elfPointer(void *map, off_t offset,
- size_t fileSize)
+typename std::remove_extent_t<T> *elfPointer(void *map, off_t offset,
+ size_t fileSize)
{
return elfPointer<T>(map, offset, fileSize, sizeof(T));
}