Changeset ff29f08 for src/Common/PassVisitor.proto.h
- Timestamp:
- May 18, 2018, 2:09:21 PM (6 years ago)
- Branches:
- new-env, with_gc
- Children:
- 2472a19
- Parents:
- f6f0cca3 (diff), c7d8100c (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/PassVisitor.proto.h
rf6f0cca3 rff29f08 47 47 48 48 operator bool() { return m_ref ? *m_ref : true; } 49 bool operator=( bool val ) { return *m_ref = val; }49 bool operator=( bool val ) { assert(m_ref); return *m_ref = val; } 50 50 51 51 private: … … 53 53 friend class ChildrenGuard; 54 54 55 bool * set( bool &val ) {55 bool * set( bool * val ) { 56 56 bool * prev = m_ref; 57 m_ref = &val;57 m_ref = val; 58 58 return prev; 59 59 } … … 67 67 ChildrenGuard( bool_ref * ref ) 68 68 : m_val ( true ) 69 , m_prev( ref ? ref->set( m_val ) : nullptr )69 , m_prev( ref ? ref->set( &m_val ) : nullptr ) 70 70 , m_ref ( ref ) 71 71 {} … … 73 73 ~ChildrenGuard() { 74 74 if( m_ref ) { 75 m_ref->set( *m_prev );75 m_ref->set( m_prev ); 76 76 } 77 77 }
Note: See TracChangeset
for help on using the changeset viewer.