diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libcamera/base/file.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libcamera/base/file.cpp b/src/libcamera/base/file.cpp index 944918f2..1c5879b3 100644 --- a/src/libcamera/base/file.cpp +++ b/src/libcamera/base/file.cpp @@ -58,7 +58,7 @@ LOG_DEFINE_CATEGORY(File) */ /** - * \enum File::OpenMode + * \enum File::OpenModeFlag * \brief Mode in which a file is opened * \var File::NotOpen * \brief The file is not open @@ -71,6 +71,11 @@ LOG_DEFINE_CATEGORY(File) */ /** + * \typedef File::OpenMode + * \brief A bitwise combination of File::OpenModeFlag values + */ + +/** * \brief Construct a File to represent the file \a name * \param[in] name The file name * @@ -168,7 +173,7 @@ bool File::open(File::OpenMode mode) return false; } - int flags = (mode & ReadWrite) - 1; + int flags = static_cast<OpenMode::Type>(mode & ReadWrite) - 1; if (mode & WriteOnly) flags |= O_CREAT; |