mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-28 13:18:19 +00:00
Everywhere: Run clang-format
The following command was used to clang-format these files: clang-format-19 -i $(find . \ -not \( -path "./\.*" -prune \) \ -not \( -path "./Build/*" -prune \) \ -not \( -path "./Toolchain/*" -prune \) \ -type f -name "*.cpp" -o -name "*.mm" -o -name "*.h")
This commit is contained in:
parent
66732d2203
commit
27478ec7d4
Notes:
github-actions[bot]
2024-12-28 13:40:37 +00:00
Author: https://github.com/trflynn89
Commit: 27478ec7d4
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3067
57 changed files with 160 additions and 140 deletions
|
@ -16,17 +16,17 @@ class IntrusiveRedBlackTreeNode;
|
|||
|
||||
struct ExtractIntrusiveRedBlackTreeTypes {
|
||||
template<typename K, typename V, typename Container, typename T>
|
||||
static K key(IntrusiveRedBlackTreeNode<K, V, Container> T::*x);
|
||||
static K key(IntrusiveRedBlackTreeNode<K, V, Container> T::* x);
|
||||
template<typename K, typename V, typename Container, typename T>
|
||||
static V value(IntrusiveRedBlackTreeNode<K, V, Container> T::*x);
|
||||
static V value(IntrusiveRedBlackTreeNode<K, V, Container> T::* x);
|
||||
template<typename K, typename V, typename Container, typename T>
|
||||
static Container container(IntrusiveRedBlackTreeNode<K, V, Container> T::*x);
|
||||
static Container container(IntrusiveRedBlackTreeNode<K, V, Container> T::* x);
|
||||
};
|
||||
|
||||
template<Integral K, typename V, typename Container = RawPtr<V>>
|
||||
using SubstitutedIntrusiveRedBlackTreeNode = IntrusiveRedBlackTreeNode<K, V, typename SubstituteIntrusiveContainerType<V, Container>::Type>;
|
||||
|
||||
template<Integral K, typename V, typename Container, SubstitutedIntrusiveRedBlackTreeNode<K, V, Container> V::*member>
|
||||
template<Integral K, typename V, typename Container, SubstitutedIntrusiveRedBlackTreeNode<K, V, Container> V::* member>
|
||||
class IntrusiveRedBlackTree : public BaseRedBlackTree<K> {
|
||||
|
||||
public:
|
||||
|
@ -200,7 +200,7 @@ public:
|
|||
|
||||
#if !defined(AK_COMPILER_CLANG)
|
||||
private:
|
||||
template<Integral TK, typename TV, typename TContainer, SubstitutedIntrusiveRedBlackTreeNode<TK, TV, TContainer> TV::*member>
|
||||
template<Integral TK, typename TV, typename TContainer, SubstitutedIntrusiveRedBlackTreeNode<TK, TV, TContainer> TV::* member>
|
||||
friend class ::AK::Detail::IntrusiveRedBlackTree;
|
||||
#endif
|
||||
|
||||
|
@ -211,7 +211,7 @@ private:
|
|||
// Specialise IntrusiveRedBlackTree for NonnullRefPtr
|
||||
// By default, red black trees cannot contain null entries anyway, so switch to RefPtr
|
||||
// and just make the user-facing functions deref the pointers.
|
||||
template<Integral K, typename V, SubstitutedIntrusiveRedBlackTreeNode<K, V, NonnullRefPtr<V>> V::*member>
|
||||
template<Integral K, typename V, SubstitutedIntrusiveRedBlackTreeNode<K, V, NonnullRefPtr<V>> V::* member>
|
||||
class IntrusiveRedBlackTree<K, V, NonnullRefPtr<V>, member> : public IntrusiveRedBlackTree<K, V, RefPtr<V>, member> {
|
||||
public:
|
||||
[[nodiscard]] NonnullRefPtr<V> find(K key) const { return IntrusiveRedBlackTree<K, V, RefPtr<V>, member>::find(key).release_nonnull(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue