diff options
author | Ben Wiederhake <BenWiederhake.GitHub@gmx.de> | 2021-10-15 23:15:12 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-10-21 01:08:14 +0200 |
commit | c55527944cdc46471702063f4eff6f3ed99e7fa7 (patch) | |
tree | 4d38d452eff899111e7c82d89569a1dd8cb83557 /Userland/Libraries | |
parent | a36d13e36c707635b2b0b6727d542b92e609277a (diff) | |
download | serenity-c55527944cdc46471702063f4eff6f3ed99e7fa7.zip |
LibWeb: Convert const pointer to nonnull into a reference
Diffstat (limited to 'Userland/Libraries')
-rw-r--r-- | Userland/Libraries/LibWeb/Layout/FormattingContext.cpp | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/Layout/FormattingContext.h | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp index c11c5bb1ca..d6899a790c 100644 --- a/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp @@ -22,7 +22,7 @@ namespace Web::Layout { FormattingContext::FormattingContext(Type type, Box& context_box, FormattingContext* parent) : m_type(type) , m_parent(parent) - , m_context_box(&context_box) + , m_context_box(context_box) { } diff --git a/Userland/Libraries/LibWeb/Layout/FormattingContext.h b/Userland/Libraries/LibWeb/Layout/FormattingContext.h index d88163b4bd..895bd9ddff 100644 --- a/Userland/Libraries/LibWeb/Layout/FormattingContext.h +++ b/Userland/Libraries/LibWeb/Layout/FormattingContext.h @@ -25,8 +25,8 @@ public: virtual void run(Box&, LayoutMode) = 0; - Box& context_box() { return *m_context_box; } - const Box& context_box() const { return *m_context_box; } + Box& context_box() { return m_context_box; } + const Box& context_box() const { return m_context_box; } FormattingContext* parent() { return m_parent; } const FormattingContext* parent() const { return m_parent; } @@ -69,7 +69,7 @@ protected: Type m_type {}; FormattingContext* m_parent { nullptr }; - Box* m_context_box { nullptr }; + Box& m_context_box; }; } |