1
0
Fork 0
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:
Hendiadyoin1 2021-12-15 14:55:18 +01:00 committed by Brian Gianforcaro
parent fe2cf774c3
commit 4cec16a713
Notes: sideshowbarker 2024-07-17 22:45:13 +09:00
7 changed files with 20 additions and 20 deletions

View file

@ -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) {