1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 00:27:45 +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,5 +1,5 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2018-2023, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -34,10 +34,10 @@ struct Traits<FontSelector> : public GenericTraits<FontSelector> {
class FontCache {
public:
static FontCache& the();
RefPtr<Gfx::Font> get(FontSelector const&) const;
void set(FontSelector const&, NonnullRefPtr<Gfx::Font>);
RefPtr<Gfx::Font const> get(FontSelector const&) const;
void set(FontSelector const&, NonnullRefPtr<Gfx::Font const>);
private:
FontCache() = default;
mutable HashMap<FontSelector, NonnullRefPtr<Gfx::Font>> m_fonts;
mutable HashMap<FontSelector, NonnullRefPtr<Gfx::Font const>> m_fonts;
};