mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 02:12:09 -05:00
Ext2FS: Make some use of Vector::empend().
This commit is contained in:
parent
9230b42f28
commit
4afafeae50
1 changed files with 3 additions and 3 deletions
|
@ -790,7 +790,7 @@ KResult Ext2FSInode::add_child(InodeIdentifier child_id, const StringView& name,
|
|||
if (child_inode)
|
||||
child_inode->increment_link_count();
|
||||
|
||||
entries.append({ name.characters_without_null_termination(), name.length(), child_id, to_ext2_file_type(mode) });
|
||||
entries.empend(name.characters_without_null_termination(), name.length(), child_id, to_ext2_file_type(mode));
|
||||
bool success = write_directory(entries);
|
||||
if (success)
|
||||
m_lookup_cache.set(name, child_id.index());
|
||||
|
@ -1135,8 +1135,8 @@ RefPtr<Inode> Ext2FS::create_directory(InodeIdentifier parent_id, const String&
|
|||
#endif
|
||||
|
||||
Vector<DirectoryEntry> entries;
|
||||
entries.append({ ".", inode->identifier(), EXT2_FT_DIR });
|
||||
entries.append({ "..", parent_id, EXT2_FT_DIR });
|
||||
entries.empend(".", inode->identifier(), EXT2_FT_DIR);
|
||||
entries.empend("..", parent_id, EXT2_FT_DIR);
|
||||
|
||||
bool success = static_cast<Ext2FSInode&>(*inode).write_directory(entries);
|
||||
ASSERT(success);
|
||||
|
|
Loading…
Add table
Reference in a new issue