mirror of
https://github.com/RGBCube/serenity
synced 2025-07-04 21:17:36 +00:00
AK: Make Vector::try_* functions return ErrorOr<void>
Instead of signalling allocation failure with a bool return value (false), we now use ErrorOr<void> and return ENOMEM as appropriate. This allows us to use TRY() and MUST() with Vector. :^)
This commit is contained in:
parent
cd49f30bea
commit
88b6428c25
16 changed files with 98 additions and 152 deletions
|
@ -55,10 +55,7 @@ public:
|
|||
if (has_flag(m_current_header->file_flags, ISO::FileFlags::Directory)) {
|
||||
dbgln_if(ISO9660_VERY_DEBUG, "next(): Recursing");
|
||||
{
|
||||
bool result = m_directory_stack.try_append(move(m_current_directory));
|
||||
if (!result) {
|
||||
return ENOMEM;
|
||||
}
|
||||
TRY(m_directory_stack.try_append(move(m_current_directory)));
|
||||
}
|
||||
|
||||
dbgln_if(ISO9660_VERY_DEBUG, "next(): Pushed into directory stack");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue