Ignore:
Timestamp:
May 17, 2015, 1:19:35 PM (9 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
0dd3a2f
Parents:
b87a5ed
Message:

licencing: second groups of files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • translator/InitTweak/diet_map.h

    rb87a5ed ra32b204  
    3434    diet_tree() : root(0), left(0), right(0) {}
    3535    ~diet_tree() {
    36       if( root != 0 ) { delete root; root = 0; }
    37       if( left != 0 ) { delete left; left = 0; }
    38       if( right != 0 ) { delete right; right = 0; }
     36      if ( root != 0 ) { delete root; root = 0; }
     37      if ( left != 0 ) { delete left; left = 0; }
     38      if ( right != 0 ) { delete right; right = 0; }
    3939    }
    4040
     
    4545      else {
    4646        value_type lo = root->get_lo(), hi = root->get_hi();
    47         if( _lo < lo ) {
    48           if( _hi > hi ) {
     47        if ( _lo < lo ) {
     48          if ( _hi > hi ) {
    4949            /* can either minimize the work or minimize the number of nodes.
    5050               Let's minimize the work. */
     
    5454            right->insert( _hi, hi );
    5555            return;
    56           } else if( _hi < lo ) {
     56          } else if ( _hi < lo ) {
    5757            if ( left == 0 ) left = new diet_tree<T>();
    5858            left->insert( _lo, _hi );
    59           } else if( _hi <= hi ) {
     59          } else if ( _hi <= hi ) {
    6060            if ( left == 0 ) left = new diet_tree<T>();
    6161            left->insert( _lo, _hi );
     
    6565          root->set_range(_lo,_hi);
    6666        } else if ( _hi > hi) {
    67           if( _lo > hi ) {
     67          if ( _lo > hi ) {
    6868            if ( right == 0 ) right = new diet_tree<T>();
    6969            right->insert( _lo, _hi );
    70           } else if( _lo < hi ) {
     70          } else if ( _lo < hi ) {
    7171            root->set_range(lo, _lo);
    7272            if ( right == 0 ) right = new diet_tree<T>();
     
    152152      assert(current != 0);
    153153      if ( current->right == 0 )
    154         if ( !st.empty() )
     154        if ( ! st.empty() )
    155155          { current = st.top(); st.pop(); }
    156156        else
     
    173173      assert(current != 0);
    174174      diet_tree<T> *next = 0;
    175       while( current->left != 0 ) {
     175      while ( current->left != 0 ) {
    176176        next = current->left; st.push( current ); current = next;
    177177      }
Note: See TracChangeset for help on using the changeset viewer.