Changeset 1c85ffc for src/AST/Chain.hpp


Ignore:
Timestamp:
Dec 5, 2023, 11:50:10 AM (6 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
81da3da4
Parents:
2b12d6e (diff), 2345ab3 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Chain.hpp

    r2b12d6e r1c85ffc  
    3333        template<typename actual_node_t, typename child_t>
    3434        auto operator()( child_t actual_node_t::*child ) {
    35                 auto n = mutate(base.get());
     35                node_t * n = base.get_and_mutate();
    3636                actual_node_t * node = strict_dynamic_cast<actual_node_t *>(n);
    37                 base = node;
    3837                return _chain_mutator< typename std::remove_reference< decltype(node->*child) >::type >{node->*child};
    3938        }
    4039
    4140        node_t * operator->() {
    42                 auto n = mutate(base.get());
    43                 base = n;
    44                 return n;
     41                return base.get_and_mutate();
    4542        }
    4643};
Note: See TracChangeset for help on using the changeset viewer.