Skip to content

Commit

Permalink
refactor(fe): avoid silly dereference then addressof
Browse files Browse the repository at this point in the history
  • Loading branch information
strager committed Oct 31, 2023
1 parent 0c856f3 commit 645999a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/quick-lint-js/fe/expression.h
Original file line number Diff line number Diff line change
Expand Up @@ -304,14 +304,14 @@ template <class Derived>
Derived expression_cast(Expression *p) {
// TODO(strager): Assert that Derived matches the Expression's run-time
// type.
return static_cast<Derived>(&*p);
return static_cast<Derived>(p);
}

template <class Derived>
Derived expression_cast(const Expression *p) {
// TODO(strager): Assert that Derived matches the Expression's run-time
// type.
return static_cast<Derived>(&*p);
return static_cast<Derived>(p);
}

template <class Derived>
Expand Down

0 comments on commit 645999a

Please sign in to comment.