From 762b92c650295b4855028fbd5124adb2669a5b93 Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Sun, 31 Oct 2021 14:56:10 -0600 Subject: [PATCH] AK: Resolve clang-tidy readability-qualified-auto warnings ... In files included by Kernel/Process.cpp and Kernel/Thread.cpp --- AK/Bitmap.h | 2 +- AK/ByteBuffer.h | 4 ++-- AK/HashTable.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/AK/Bitmap.h b/AK/Bitmap.h index a84a33c83e..bea24f7d30 100644 --- a/AK/Bitmap.h +++ b/AK/Bitmap.h @@ -82,7 +82,7 @@ public: auto previous_size_bytes = size_in_bytes(); auto previous_size = m_size; - auto previous_data = m_data; + auto* previous_data = m_data; m_size = size; m_data = reinterpret_cast(kmalloc(size_in_bytes())); diff --git a/AK/ByteBuffer.h b/AK/ByteBuffer.h index 5387eab995..c0cbe0b2ba 100644 --- a/AK/ByteBuffer.h +++ b/AK/ByteBuffer.h @@ -254,7 +254,7 @@ private: NEVER_INLINE void shrink_into_inline_buffer(size_t size, bool may_discard_existing_data) { // m_inline_buffer and m_outline_buffer are part of a union, so save the pointer - auto outline_buffer = m_outline_buffer; + auto* outline_buffer = m_outline_buffer; auto outline_capacity = m_outline_capacity; if (!may_discard_existing_data) __builtin_memcpy(m_inline_buffer, outline_buffer, size); @@ -265,7 +265,7 @@ private: NEVER_INLINE ErrorOr try_ensure_capacity_slowpath(size_t new_capacity) { new_capacity = kmalloc_good_size(new_capacity); - auto new_buffer = (u8*)kmalloc(new_capacity); + auto* new_buffer = (u8*)kmalloc(new_capacity); if (!new_buffer) return Error::from_errno(ENOMEM); diff --git a/AK/HashTable.h b/AK/HashTable.h index a9fe6f9759..f736d5415b 100644 --- a/AK/HashTable.h +++ b/AK/HashTable.h @@ -405,7 +405,7 @@ private: auto old_capacity = m_capacity; Iterator old_iter = begin(); - auto new_buckets = kmalloc(size_in_bytes(new_capacity)); + auto* new_buckets = kmalloc(size_in_bytes(new_capacity)); if (!new_buckets) return Error::from_errno(ENOMEM);