diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-03-16 10:07:26 +0200 |
---|---|---|
committer | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2020-03-18 18:02:40 +0100 |
commit | 718f5e99a966246de8d129902ad470872652b749 (patch) | |
tree | 0e16bc1b512304c8341c4a1334654d508631a7a7 /include | |
parent | 8c0bbcd3d3751a716eb8bf03e703aa6fdbe1bd3f (diff) |
libcamera: PixelFormat: Make constructor explicit
To achieve the goal of preventing unwanted conversion between a DRM and
a V4L2 FourCC, make the PixelFormat constructor that takes an integer
value explicit. All users of pixel formats flagged by the compiler
are fixed.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'include')
-rw-r--r-- | include/libcamera/pixelformats.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/libcamera/pixelformats.h b/include/libcamera/pixelformats.h index eb40e55a..9ce6f7f0 100644 --- a/include/libcamera/pixelformats.h +++ b/include/libcamera/pixelformats.h @@ -19,7 +19,7 @@ class PixelFormat { public: PixelFormat(); - PixelFormat(uint32_t fourcc, const std::set<uint64_t> &modifiers = {}); + explicit PixelFormat(uint32_t fourcc, const std::set<uint64_t> &modifiers = {}); bool operator==(const PixelFormat &other) const; bool operator!=(const PixelFormat &other) const { return !(*this == other); } |