mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 10:18:15 +09:00
Kernel: Add implied auto-specifiers in FileSystem
As per clang-tidy.
This commit is contained in:
parent
fe2cf774c3
commit
4cec16a713
Notes:
sideshowbarker
2024-07-17 22:45:13 +09:00
Author: https://github.com/Hendiadyoin1
Commit: 4cec16a713
Pull-request: https://github.com/SerenityOS/serenity/pull/11201
Reviewed-by: https://github.com/bgianfo
Reviewed-by: https://github.com/davidot
7 changed files with 20 additions and 20 deletions
|
@ -73,7 +73,7 @@ ErrorOr<NonnullOwnPtr<KString>> Custody::try_serialize_absolute_path() const
|
|||
|
||||
Vector<Custody const*, 32> custody_chain;
|
||||
size_t path_length = 0;
|
||||
for (auto* custody = this; custody; custody = custody->parent()) {
|
||||
for (auto const* custody = this; custody; custody = custody->parent()) {
|
||||
custody_chain.append(custody);
|
||||
path_length += custody->m_name->length() + 1;
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ ErrorOr<NonnullOwnPtr<KString>> Custody::try_serialize_absolute_path() const
|
|||
for (size_t custody_index = custody_chain.size() - 1; custody_index > 0; --custody_index) {
|
||||
buffer[string_index] = '/';
|
||||
++string_index;
|
||||
auto& custody_name = *custody_chain[custody_index - 1]->m_name;
|
||||
auto const& custody_name = *custody_chain[custody_index - 1]->m_name;
|
||||
__builtin_memcpy(buffer + string_index, custody_name.characters(), custody_name.length());
|
||||
string_index += custody_name.length();
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ String Custody::absolute_path() const
|
|||
if (!parent())
|
||||
return "/";
|
||||
Vector<Custody const*, 32> custody_chain;
|
||||
for (auto* custody = this; custody; custody = custody->parent())
|
||||
for (auto const* custody = this; custody; custody = custody->parent())
|
||||
custody_chain.append(custody);
|
||||
StringBuilder builder;
|
||||
for (int i = custody_chain.size() - 2; i >= 0; --i) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue