Changeset 21a44ca for src/AST/Node.hpp


Ignore:
Timestamp:
May 23, 2019, 6:24:18 PM (3 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
arm-eh, cleanup-dtors, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
6f4b7f2, d908563
Parents:
94b1f718 (diff), f1ec88a (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/Node.hpp

    r94b1f718 r21a44ca  
    1010// Created On       : Wed May 8 10:27:04 2019
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Wed May 15 16:02:00 2019
    13 // Update Count     : 3
     12// Last Modified On : Thu May 23 16:00:00 2019
     13// Update Count     : 4
    1414//
    1515
     
    109109        ~ptr_base() { if( node ) _dec(node); }
    110110
     111        ptr_base( const ptr_base & o ) : node(o.node) {
     112                if( node ) _inc(node);
     113        }
     114
     115        ptr_base( ptr_base && o ) : node(o.node) {
     116                if( node ) _inc(node);
     117        }
     118
    111119        template< enum Node::ref_type o_ref_t >
    112120        ptr_base( const ptr_base<node_t, o_ref_t> & o ) : node(o.node) {
     
    122130        ptr_base & operator=( const o_node_t * node ) {
    123131                assign( node ? strict_dynamic_cast<const node_t *>(node) : nullptr );
     132                return *this;
     133        }
     134
     135        ptr_base & operator=( const ptr_base & o ) {
     136                assign(o.node);
     137                return *this;
     138        }
     139
     140        ptr_base & operator=( ptr_base && o ) {
     141                assign(o.node);
    124142                return *this;
    125143        }
Note: See TracChangeset for help on using the changeset viewer.