summaryrefslogtreecommitdiff
path: root/src/android
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-01-14 01:35:22 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-01-14 19:06:40 +0200
commitacf18e4265dec2991e62f7c8baecfacf1a6708b3 (patch)
tree9113e55c2012de225f694d2824fdda444e8e8f56 /src/android
parent9a61a134669c2240100fd1ccadaf974f86fe4655 (diff)
libcamera: Switch from utils::make_unique to std::make_unique
Now that we're using C++-14, drop utils::make_unique for std::make_unique. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src/android')
-rw-r--r--src/android/camera_device.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index a98fd744..67c1d47e 100644
--- a/src/android/camera_device.cpp
+++ b/src/android/camera_device.cpp
@@ -860,7 +860,7 @@ std::unique_ptr<CameraMetadata> CameraDevice::getResultMetadata(int frame_number
* Currently: 12 entries, 36 bytes
*/
std::unique_ptr<CameraMetadata> resultMetadata =
- utils::make_unique<CameraMetadata>(15, 50);
+ std::make_unique<CameraMetadata>(15, 50);
if (!resultMetadata->isValid()) {
LOG(HAL, Error) << "Failed to allocate static metadata";
return nullptr;
span class="hl kwb">bool PixelFormat::operator==(const PixelFormat &other) const { return fourcc_ == other.fourcc() && modifier_ == other.modifier_; } /** * \fn bool PixelFormat::operator!=(const PixelFormat &other) const * \brief Compare pixel formats for inequality * \return True if the two pixel formats are not equal, false otherwise */ /** * \brief Compare pixel formats for smaller than order * \return True if \a this is smaller than \a other, false otherwise */ bool PixelFormat::operator<(const PixelFormat &other) const { if (fourcc_ < other.fourcc_) return true; if (fourcc_ > other.fourcc_) return false; return modifier_ < other.modifier_; } /** * \fn bool PixelFormat::isValid() const * \brief Check if the pixel format is valid * * PixelFormat instances constructed with the default constructor are * invalid. Instances constructed with a FourCC defined in the DRM API * are valid. The behaviour is undefined otherwise. * * \return True if the pixel format is valid, false otherwise */ /** * \fn PixelFormat::operator uint32_t() const * \brief Convert the the pixel format numerical value * \return The pixel format numerical value */ /** * \fn PixelFormat::fourcc() const * \brief Retrieve the pixel format FourCC * \return DRM FourCC */ /** * \fn PixelFormat::modifier() const * \brief Retrieve the pixel format modifier * \return DRM modifier */ /** * \brief Assemble and return a string describing the pixel format * \return A string describing the pixel format */ std::string PixelFormat::toString() const { const PixelFormatInfo &info = PixelFormatInfo::info(*this); if (!info.isValid()) { if (*this == PixelFormat()) return "<INVALID>"; char fourcc[7] = { '<', static_cast<char>(fourcc_), static_cast<char>(fourcc_ >> 8), static_cast<char>(fourcc_ >> 16), static_cast<char>(fourcc_ >> 24), '>' }; for (unsigned int i = 1; i < 5; i++) { if (!isprint(fourcc[i])) fourcc[i] = '.'; } return fourcc; } return info.name; } /** * \brief Create a PixelFormat from a string * \return Pixel format * \return The PixelFormat represented by the \a name if known, or an * invalid pixel format otherwise. */ PixelFormat PixelFormat::fromString(const std::string &name) { return PixelFormatInfo::info(name).format; } } /* namespace libcamera */