1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 09:18:11 +00:00

LibWeb+LibIDL: Fix (or paper over) various const-correctness issues

There's definitely stuff to iterate on here, but this takes care of
making the libraries compile with stricter RP and NNRP.
This commit is contained in:
Andreas Kling 2023-02-20 18:56:08 +01:00
parent 68b5df6bf1
commit f11899f885
22 changed files with 210 additions and 186 deletions

View file

@ -1,6 +1,7 @@
/*
* Copyright (c) 2020-2021, the SerenityOS developers.
* Copyright (c) 2021-2023, Sam Atkins <atkinssj@serenityos.org>
* Copyright (c) 2023, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -23,10 +24,10 @@ public:
~ComponentValue();
bool is_block() const { return m_value.has<NonnullRefPtr<Block>>(); }
Block const& block() const { return m_value.get<NonnullRefPtr<Block>>(); }
Block& block() const { return m_value.get<NonnullRefPtr<Block>>(); }
bool is_function() const { return m_value.has<NonnullRefPtr<Function>>(); }
Function const& function() const { return m_value.get<NonnullRefPtr<Function>>(); }
Function& function() const { return m_value.get<NonnullRefPtr<Function>>(); }
bool is_token() const { return m_value.has<Token>(); }
bool is(Token::Type type) const { return is_token() && token().is(type); }