1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:57:44 +00:00

WindowServer: Fix various const-correctness issues

This commit is contained in:
Andreas Kling 2023-02-20 19:02:54 +01:00
parent dbcf2f2dd4
commit 025bdcf34c
9 changed files with 59 additions and 57 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
*/
@ -15,9 +15,9 @@ namespace WindowServer {
class Cursor : public RefCounted<Cursor> {
public:
static RefPtr<Cursor> create(StringView, StringView);
static NonnullRefPtr<Cursor> create(NonnullRefPtr<Gfx::Bitmap>&&, int);
static RefPtr<Cursor> create(Gfx::StandardCursor);
static RefPtr<Cursor const> create(StringView, StringView);
static NonnullRefPtr<Cursor const> create(NonnullRefPtr<Gfx::Bitmap const>&&, int);
static RefPtr<Cursor const> create(Gfx::StandardCursor);
~Cursor() = default;
Gfx::CursorParams const& params() const { return m_params; }
@ -47,12 +47,12 @@ public:
private:
Cursor() = default;
Cursor(NonnullRefPtr<Gfx::Bitmap>&&, int, Gfx::CursorParams const&);
Cursor(NonnullRefPtr<Gfx::Bitmap const>&&, int, Gfx::CursorParams const&);
bool load(StringView, StringView);
void update_rect_if_animated();
HashMap<int, NonnullRefPtr<Gfx::Bitmap>> m_bitmaps;
HashMap<int, NonnullRefPtr<Gfx::Bitmap const>> m_bitmaps;
Gfx::CursorParams m_params;
Gfx::IntRect m_rect;
};