From 5e7e6475c63c35183ce3d0410c05d92c95aa7fd3 Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Mon, 14 Apr 2025 16:17:46 -0600 Subject: [PATCH] AK: Annotate [[no_unique_address]] members with NO_UNIQUE_ADDRESS macro --- AK/HashTable.h | 2 +- AK/IntrusiveList.h | 2 +- AK/IntrusiveRedBlackTree.h | 2 +- AK/Utf16View.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/AK/HashTable.h b/AK/HashTable.h index a30e7d1c10b..126e035db6f 100644 --- a/AK/HashTable.h +++ b/AK/HashTable.h @@ -789,7 +789,7 @@ private: BucketType* m_buckets { nullptr }; - [[no_unique_address]] CollectionDataType m_collection_data; + NO_UNIQUE_ADDRESS CollectionDataType m_collection_data; size_t m_size { 0 }; size_t m_capacity { 0 }; }; diff --git a/AK/IntrusiveList.h b/AK/IntrusiveList.h index 2617f55ccd7..9e4e690e8c7 100644 --- a/AK/IntrusiveList.h +++ b/AK/IntrusiveList.h @@ -169,7 +169,7 @@ private: IntrusiveListStorage* m_storage = nullptr; SubstitutedIntrusiveListNode* m_next = nullptr; SubstitutedIntrusiveListNode* m_prev = nullptr; - [[no_unique_address]] SelfReferenceIfNeeded m_self; + NO_UNIQUE_ADDRESS SelfReferenceIfNeeded m_self; }; template T::* member> diff --git a/AK/IntrusiveRedBlackTree.h b/AK/IntrusiveRedBlackTree.h index a5585de662c..28c01e8ffb5 100644 --- a/AK/IntrusiveRedBlackTree.h +++ b/AK/IntrusiveRedBlackTree.h @@ -212,7 +212,7 @@ private: #endif bool m_in_tree { false }; - [[no_unique_address]] SelfReferenceIfNeeded m_self; + NO_UNIQUE_ADDRESS SelfReferenceIfNeeded m_self; }; // Specialise IntrusiveRedBlackTree for NonnullRefPtr diff --git a/AK/Utf16View.h b/AK/Utf16View.h index b26d4faf1be..e993bf40521 100644 --- a/AK/Utf16View.h +++ b/AK/Utf16View.h @@ -138,7 +138,7 @@ private: size_t calculate_length_in_code_points() const; ReadonlySpan m_code_units; - [[no_unique_address]] mutable Optional m_length_in_code_points; + NO_UNIQUE_ADDRESS mutable Optional m_length_in_code_points; Endianness m_endianness { Endianness::Host }; };