Everywhere: Run clang-format

This commit is contained in:
Idan Horowitz 2022-04-01 20:58:27 +03:00 committed by Linus Groh
parent 0376c127f6
commit 086969277e
Notes: sideshowbarker 2024-07-17 16:21:09 +09:00
1665 changed files with 8479 additions and 8479 deletions

View file

@ -89,7 +89,7 @@ public:
return &new_entry;
}
const CacheEntry* entries() const { return (const CacheEntry*)m_entries->data(); }
CacheEntry const* entries() const { return (CacheEntry const*)m_entries->data(); }
CacheEntry* entries() { return (CacheEntry*)m_entries->data(); }
template<typename Callback>
@ -129,7 +129,7 @@ ErrorOr<void> BlockBasedFileSystem::initialize()
return {};
}
ErrorOr<void> BlockBasedFileSystem::write_block(BlockIndex index, const UserOrKernelBuffer& data, size_t count, u64 offset, bool allow_cache)
ErrorOr<void> BlockBasedFileSystem::write_block(BlockIndex index, UserOrKernelBuffer const& data, size_t count, u64 offset, bool allow_cache)
{
VERIFY(m_logical_block_size);
VERIFY(offset + count <= block_size());
@ -172,7 +172,7 @@ ErrorOr<void> BlockBasedFileSystem::raw_read(BlockIndex index, UserOrKernelBuffe
return {};
}
ErrorOr<void> BlockBasedFileSystem::raw_write(BlockIndex index, const UserOrKernelBuffer& buffer)
ErrorOr<void> BlockBasedFileSystem::raw_write(BlockIndex index, UserOrKernelBuffer const& buffer)
{
auto base_offset = index.value() * m_logical_block_size;
auto nwritten = TRY(file_description().write(base_offset, buffer, m_logical_block_size));
@ -190,7 +190,7 @@ ErrorOr<void> BlockBasedFileSystem::raw_read_blocks(BlockIndex index, size_t cou
return {};
}
ErrorOr<void> BlockBasedFileSystem::raw_write_blocks(BlockIndex index, size_t count, const UserOrKernelBuffer& buffer)
ErrorOr<void> BlockBasedFileSystem::raw_write_blocks(BlockIndex index, size_t count, UserOrKernelBuffer const& buffer)
{
auto current = buffer;
for (auto block = index.value(); block < (index.value() + count); block++) {
@ -200,7 +200,7 @@ ErrorOr<void> BlockBasedFileSystem::raw_write_blocks(BlockIndex index, size_t co
return {};
}
ErrorOr<void> BlockBasedFileSystem::write_blocks(BlockIndex index, unsigned count, const UserOrKernelBuffer& data, bool allow_cache)
ErrorOr<void> BlockBasedFileSystem::write_blocks(BlockIndex index, unsigned count, UserOrKernelBuffer const& data, bool allow_cache)
{
VERIFY(m_logical_block_size);
dbgln_if(BBFS_DEBUG, "BlockBasedFileSystem::write_blocks {}, count={}", index, count);