Changeset 4ae2364 for src/AST/Node.hpp


Ignore:
Timestamp:
Jun 3, 2019, 5:36:47 PM (5 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
98a8290, ee574a2
Parents:
f474e91 (diff), dafe9e1 (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

    rf474e91 r4ae2364  
    1010// Created On       : Wed May 8 10:27:04 2019
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Thu May 23 16:00:00 2019
    13 // Update Count     : 4
     12// Last Modified On : Mon Jun  3 13:26:00 2019
     13// Update Count     : 5
    1414//
    1515
     
    107107        ptr_base() : node(nullptr) {}
    108108        ptr_base( const node_t * n ) : node(n) { if( node ) _inc(node); }
    109         ~ptr_base() { if( node ) _dec(node); }
     109        ~ptr_base() { if( node ) { auto tmp = node; node = nullptr; _dec(tmp); } }
    110110
    111111        ptr_base( const ptr_base & o ) : node(o.node) {
     
    127127        template<typename o_node_t>
    128128        ptr_base & operator=( const o_node_t * node ) {
    129                 assign( node ? strict_dynamic_cast<const node_t *>(node) : nullptr );
     129                assign( strict_dynamic_cast<const node_t *, nullptr>(node) );
    130130                return *this;
    131131        }
Note: See TracChangeset for help on using the changeset viewer.