mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibDebug: Make LineProgram::create take DwarfInfo as a const reference
The m_dwarf_info is never mutated, so it can be const.
This commit is contained in:
parent
bc7d067821
commit
14ae04075e
Notes:
sideshowbarker
2024-07-17 03:45:48 +09:00
Author: https://github.com/spholz
Commit: 14ae04075e
Pull-request: https://github.com/SerenityOS/serenity/pull/24204
Reviewed-by: https://github.com/ADKaster ✅
2 changed files with 5 additions and 5 deletions
|
@ -13,13 +13,13 @@
|
|||
|
||||
namespace Debug::Dwarf {
|
||||
|
||||
LineProgram::LineProgram(DwarfInfo& dwarf_info, size_t unit_offset)
|
||||
LineProgram::LineProgram(DwarfInfo const& dwarf_info, size_t unit_offset)
|
||||
: m_dwarf_info(dwarf_info)
|
||||
, m_unit_offset(unit_offset)
|
||||
{
|
||||
}
|
||||
|
||||
ErrorOr<NonnullOwnPtr<LineProgram>> LineProgram::create(DwarfInfo& dwarf_info, SeekableStream& stream)
|
||||
ErrorOr<NonnullOwnPtr<LineProgram>> LineProgram::create(DwarfInfo const& dwarf_info, SeekableStream& stream)
|
||||
{
|
||||
auto offset = TRY(stream.tell());
|
||||
auto program = TRY(adopt_nonnull_own_or_enomem(new (nothrow) LineProgram(dwarf_info, offset)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue