1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:17:44 +00:00

LibJS: Remove DeprecatedString usage from SourceCode

This change also requires updates to some users of the SourceCode
interface since it no longer use DeprecatedString.
This commit is contained in:
Evan Smal 2023-01-26 08:33:18 -05:00 committed by Linus Groh
parent 82a152b696
commit 93674e4383
6 changed files with 19 additions and 19 deletions

View file

@ -6,7 +6,7 @@
#pragma once
#include <AK/DeprecatedString.h>
#include <AK/String.h>
#include <AK/Vector.h>
#include <LibJS/Forward.h>
@ -14,20 +14,20 @@ namespace JS {
class SourceCode : public RefCounted<SourceCode> {
public:
static NonnullRefPtr<SourceCode> create(DeprecatedString filename, DeprecatedString code);
static NonnullRefPtr<SourceCode> create(String filename, String code);
DeprecatedString const& filename() const;
DeprecatedString const& code() const;
String const& filename() const;
String const& code() const;
SourceRange range_from_offsets(u32 start_offset, u32 end_offset) const;
private:
SourceCode(DeprecatedString filename, DeprecatedString code);
SourceCode(String filename, String code);
void compute_line_break_offsets() const;
DeprecatedString m_filename;
DeprecatedString m_code;
String m_filename;
String m_code;
Optional<Vector<size_t>> mutable m_line_break_offsets;
};