mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:27:44 +00:00
LanguageServers/Cpp: Make token_in_position() return a StringView
This avoids a whole bunch of string allocation churn.
This commit is contained in:
parent
aaf4ec62cf
commit
d28127c807
2 changed files with 6 additions and 5 deletions
|
@ -45,7 +45,7 @@ public:
|
|||
|
||||
private:
|
||||
static Optional<size_t> token_in_position(const Vector<Cpp::Token>&, const GUI::TextPosition&);
|
||||
static String text_of_token(const Vector<String>& lines, const Cpp::Token&);
|
||||
static StringView text_of_token(const Vector<String>& lines, const Cpp::Token&);
|
||||
static Vector<AutoCompleteResponse> identifier_prefixes(const Vector<String>& lines, const Vector<Cpp::Token>&, size_t target_token_index);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue