1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-08 05:27:14 +09:00

AK: Annotate [[no_unique_address]] members with NO_UNIQUE_ADDRESS macro

This commit is contained in:
Andrew Kaster 2025-04-14 16:17:46 -06:00 committed by Andrew Kaster
parent b133c27305
commit 5e7e6475c6
Notes: github-actions[bot] 2025-04-15 08:20:07 +00:00
4 changed files with 4 additions and 4 deletions

View file

@ -789,7 +789,7 @@ private:
BucketType* m_buckets { nullptr }; 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_size { 0 };
size_t m_capacity { 0 }; size_t m_capacity { 0 };
}; };

View file

@ -169,7 +169,7 @@ private:
IntrusiveListStorage<T, Container>* m_storage = nullptr; IntrusiveListStorage<T, Container>* m_storage = nullptr;
SubstitutedIntrusiveListNode<T, Container>* m_next = nullptr; SubstitutedIntrusiveListNode<T, Container>* m_next = nullptr;
SubstitutedIntrusiveListNode<T, Container>* m_prev = nullptr; SubstitutedIntrusiveListNode<T, Container>* m_prev = nullptr;
[[no_unique_address]] SelfReferenceIfNeeded<Container, IsRaw> m_self; NO_UNIQUE_ADDRESS SelfReferenceIfNeeded<Container, IsRaw> m_self;
}; };
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member> template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>

View file

@ -212,7 +212,7 @@ private:
#endif #endif
bool m_in_tree { false }; bool m_in_tree { false };
[[no_unique_address]] SelfReferenceIfNeeded<Container, IsRaw> m_self; NO_UNIQUE_ADDRESS SelfReferenceIfNeeded<Container, IsRaw> m_self;
}; };
// Specialise IntrusiveRedBlackTree for NonnullRefPtr // Specialise IntrusiveRedBlackTree for NonnullRefPtr

View file

@ -138,7 +138,7 @@ private:
size_t calculate_length_in_code_points() const; size_t calculate_length_in_code_points() const;
ReadonlySpan<u16> m_code_units; ReadonlySpan<u16> m_code_units;
[[no_unique_address]] mutable Optional<size_t> m_length_in_code_points; NO_UNIQUE_ADDRESS mutable Optional<size_t> m_length_in_code_points;
Endianness m_endianness { Endianness::Host }; Endianness m_endianness { Endianness::Host };
}; };