diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-07-25 02:17:48 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-08-03 10:55:26 +0300 |
commit | 49862904f6cc707d300fab079ffe8173bf24d5d4 (patch) | |
tree | dae3f1d10c0eb7370ff7d948c356c5c012d11484 /src | |
parent | f7c6b1228bb0073ebdcab04599e96de0ace31064 (diff) |
libcamera: file: Use Flags<> class for map flags
Use the newly introduced Flags<> class to store a bitfield of
File::MapFlag in a type-safe way.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/libcamera/base/file.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libcamera/base/file.cpp b/src/libcamera/base/file.cpp index 073666fa..944918f2 100644 --- a/src/libcamera/base/file.cpp +++ b/src/libcamera/base/file.cpp @@ -53,6 +53,11 @@ LOG_DEFINE_CATEGORY(File) */ /** + * \typedef File::MapFlags + * \brief A bitwise combination of File::MapFlag values + */ + +/** * \enum File::OpenMode * \brief Mode in which a file is opened * \var File::NotOpen @@ -371,7 +376,7 @@ ssize_t File::write(const Span<const uint8_t> &data) * * \return The mapped memory on success, or an empty span otherwise */ -Span<uint8_t> File::map(off_t offset, ssize_t size, enum File::MapFlag flags) +Span<uint8_t> File::map(off_t offset, ssize_t size, File::MapFlags flags) { if (!isOpen()) { error_ = -EBADF; |