mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:04:57 +00:00
AK: Use an enum to specify the open mode instead of a bool
Let's replace this bool with an `enum class` in order to enhance readability. This is done by repurposing `MappedFile`'s `OpenMode` into a shared `enum` simply called `Mode`.
This commit is contained in:
parent
00ad8419cf
commit
b00476abac
7 changed files with 24 additions and 25 deletions
|
@ -12,9 +12,9 @@
|
|||
|
||||
namespace AK {
|
||||
|
||||
FixedMemoryStream::FixedMemoryStream(Bytes bytes, bool writing_enabled)
|
||||
FixedMemoryStream::FixedMemoryStream(Bytes bytes, Mode mode)
|
||||
: m_bytes(bytes)
|
||||
, m_writing_enabled(writing_enabled)
|
||||
, m_writing_enabled(mode == Mode::ReadWrite)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue