mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 06:48:49 +00:00
AK: Use direct-list-initialization for Vector::empend() (#4564)
clang trunk with -std=c++20 doesn't seem to properly look for an aggregate initializer here when the type being constructed is a simple aggregate (e.g. `struct Thing { int a; int b; };`). This template fails to compile in a usage added 12/16/2020 in `AK/Trie.h`. Both forms of initialization are supposed to call the aggregate-initializers but direct-list-initialization delegating to aggregate initializers is a new addition in c++20 that might not be implemented yet.
This commit is contained in:
parent
1867c928a9
commit
d1891f67ac
Notes:
sideshowbarker
2024-07-19 00:32:00 +09:00
Author: https://github.com/lanza
Commit: d1891f67ac
Pull-request: https://github.com/SerenityOS/serenity/pull/4564
4 changed files with 6 additions and 6 deletions
|
@ -1433,8 +1433,8 @@ KResult Ext2FS::create_directory(InodeIdentifier parent_id, const String& name,
|
|||
#endif
|
||||
|
||||
Vector<Ext2FSDirectoryEntry> entries;
|
||||
entries.empend(".", inode->identifier(), EXT2_FT_DIR);
|
||||
entries.empend("..", parent_id, EXT2_FT_DIR);
|
||||
entries.empend(".", inode->identifier(), static_cast<u8>(EXT2_FT_DIR));
|
||||
entries.empend("..", parent_id, static_cast<u8>(EXT2_FT_DIR));
|
||||
|
||||
bool success = static_cast<Ext2FSInode&>(*inode).write_directory(entries);
|
||||
ASSERT(success);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue