Changes in src/AST/Node.hpp [87701b6:10a1225]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Node.hpp
r87701b6 r10a1225 143 143 /// Sets this pointer to a mutated version of a pointer (possibly) owned elsehere. 144 144 /// Returns a mutable version of the pointer in this node. 145 node_t * set_and_mutate( const node_t * n ) { 146 // ensure ownership of `n` by this node to avoid spurious single-owner mutates 147 assign( n ); 148 // get mutable version of `n` 149 auto r = mutate( node ); 150 // re-assign mutable version in case `mutate()` produced a new pointer 151 assign( r ); 152 return r; 153 } 145 node_t * set_and_mutate( const node_t * n ); 154 146 155 147 using ptr = const node_t *;
Note: See TracChangeset
for help on using the changeset viewer.