mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:57:35 +00:00
AK+Everywhere: Rename String to DeprecatedString
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
This commit is contained in:
parent
f74251606d
commit
6e19ab2bbc
2006 changed files with 11635 additions and 11636 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/String.h>
|
||||
#include <AK/DeprecatedString.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(String filename, String code);
|
||||
static NonnullRefPtr<SourceCode> create(DeprecatedString filename, DeprecatedString code);
|
||||
|
||||
String const& filename() const;
|
||||
String const& code() const;
|
||||
DeprecatedString const& filename() const;
|
||||
DeprecatedString const& code() const;
|
||||
|
||||
SourceRange range_from_offsets(u32 start_offset, u32 end_offset) const;
|
||||
|
||||
private:
|
||||
SourceCode(String filename, String code);
|
||||
SourceCode(DeprecatedString filename, DeprecatedString code);
|
||||
|
||||
void compute_line_break_offsets() const;
|
||||
|
||||
String m_filename;
|
||||
String m_code;
|
||||
DeprecatedString m_filename;
|
||||
DeprecatedString m_code;
|
||||
|
||||
Optional<Vector<size_t>> mutable m_line_break_offsets;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue