mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:47:34 +00:00
AK+Everywhere: Make Variant::visit() respect the Variant's constness
...and fix all the instances of visit() taking non-const arguments.
This commit is contained in:
parent
d55c130df5
commit
9de33629da
7 changed files with 44 additions and 31 deletions
|
@ -35,13 +35,13 @@ MatchResult Supports::Condition::evaluate() const
|
|||
MatchResult Supports::InParens::evaluate() const
|
||||
{
|
||||
return value.visit(
|
||||
[&](NonnullOwnPtr<Condition>& condition) {
|
||||
[&](NonnullOwnPtr<Condition> const& condition) {
|
||||
return condition->evaluate();
|
||||
},
|
||||
[&](Feature& feature) {
|
||||
[&](Feature const& feature) {
|
||||
return feature.evaluate();
|
||||
},
|
||||
[&](GeneralEnclosed& general_enclosed) {
|
||||
[&](GeneralEnclosed const& general_enclosed) {
|
||||
return general_enclosed.evaluate();
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue