1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:24:57 +00:00

Shell: Fix (and paper over) various const-correctness issues

This commit is contained in:
Andreas Kling 2023-02-20 18:26:54 +01:00
parent 39a1702c99
commit 68b5df6bf1
9 changed files with 81 additions and 81 deletions

View file

@ -180,7 +180,7 @@ Optional<CodeComprehension::ProjectLocation> ShellComprehensionEngine::find_decl
return {};
}
auto name = static_ptr_cast<::Shell::AST::BarewordLiteral>(result.matching_node)->text();
auto name = static_ptr_cast<::Shell::AST::BarewordLiteral const>(result.matching_node)->text();
auto& declarations = all_declarations();
for (auto& entry : declarations) {
for (auto& declaration : entry.value) {
@ -209,7 +209,7 @@ void ShellComprehensionEngine::update_declared_symbols(DocumentData const& docum
DeprecatedString name;
if (literal->is_bareword())
name = static_ptr_cast<::Shell::AST::BarewordLiteral>(literal)->text();
name = static_ptr_cast<::Shell::AST::BarewordLiteral const>(literal)->text();
if (!name.is_empty()) {
dbgln("Found variable {}", name);