mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:27:44 +00:00
Kernel: Make OpenFileDescriptions::max_open() static and constexpr
This method was just returning a static constexpr member variable verbatim, so there's no point requiring a member function to observe its value.
This commit is contained in:
parent
fff265a9a9
commit
bc29c7f04f
2 changed files with 4 additions and 4 deletions
|
@ -663,9 +663,9 @@ public:
|
|||
|
||||
ErrorOr<void> try_resize(size_t size) { return m_fds_metadatas.try_resize(size); }
|
||||
|
||||
size_t max_open() const
|
||||
static constexpr size_t max_open()
|
||||
{
|
||||
return m_max_open_file_descriptors;
|
||||
return s_max_open_file_descriptors;
|
||||
}
|
||||
|
||||
void clear()
|
||||
|
@ -678,7 +678,7 @@ public:
|
|||
|
||||
private:
|
||||
OpenFileDescriptions() = default;
|
||||
static constexpr size_t m_max_open_file_descriptors { FD_SETSIZE };
|
||||
static constexpr size_t s_max_open_file_descriptors { FD_SETSIZE };
|
||||
mutable Spinlock m_fds_lock;
|
||||
Vector<OpenFileDescriptionAndFlags> m_fds_metadatas;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue