mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:07:34 +00:00
LibJS: Make RefPtr and NonnullRefPtr usage const-correct
This mainly affected the AST, which is now const throughout.
This commit is contained in:
parent
b2b942b4ec
commit
bd5d8e9d35
15 changed files with 505 additions and 494 deletions
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2020, the SerenityOS developers.
|
||||
* Copyright (c) 2023, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -21,7 +22,7 @@ struct Position {
|
|||
struct SourceRange {
|
||||
[[nodiscard]] bool contains(Position const& position) const { return position.offset <= end.offset && position.offset >= start.offset; }
|
||||
|
||||
NonnullRefPtr<SourceCode> code;
|
||||
NonnullRefPtr<SourceCode const> code;
|
||||
Position start;
|
||||
Position end;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue