Ignore:
Timestamp:
Apr 30, 2018, 11:08:10 AM (6 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, with_gc
Children:
1518b39, 1a3eab8
Parents:
7958e67 (diff), 5e5dbc2 (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:/u/cforall/software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/papers/general/evaluation/cpp-stack.hpp

    r7958e67 rb9c432f  
    1414
    1515        void clear() {
    16                 for ( node * next = head; next; ) {
    17                         node * crnt = next;
    18                         next = crnt->next;
    19                         delete crnt;
     16                for ( node * nx = head; nx; ) {
     17                        node * cr = nx;
     18                        nx = cr->next;
     19                        delete cr;
    2020                }
    2121                head = nullptr;
     
    2323
    2424        void copy( const stack<T> & o ) {
    25                 node ** crnt = &head;
    26                 for ( node * next = o.head; next; next = next->next ) {
    27                         *crnt = new node{ next->value }; /***/
    28                         crnt = &(*crnt)->next;
     25                node ** cr = &head;
     26                for ( node * nx = o.head; nx; nx = nx->next ) {
     27                        *cr = new node{ nx->value }; /***/
     28                        cr = &(*cr)->next;
    2929                }
    30                 *crnt = nullptr;
     30                *cr = nullptr;
    3131        }
    3232
Note: See TracChangeset for help on using the changeset viewer.