Ignore:
Timestamp:
Apr 30, 2018, 11:59:07 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:
7b45636
Parents:
c0453ca3 (diff), b9c432f (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' into fix-reference-overloading

File:
1 edited

Legend:

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

    rc0453ca3 r1a3eab8  
    55
    66void stack::clear() {
    7         for ( node * next = head; next; ) {
    8                 node * crnt = next;
    9                 next = crnt->next;
    10                 delete crnt;
     7        for ( node * nx = head; nx; ) {
     8                node * cr = nx;
     9                nx = cr->next;
     10                delete cr;
    1111        }
    1212        head = nullptr;
     
    1414
    1515void stack::copy( const stack & o ) {
    16         node ** crnt = &head;
    17         for ( node * next = o.head; next; next = next->next ) {
    18                 *crnt = new node{ *next->value }; /***/
    19                 crnt = &(*crnt)->next;
     16        node ** cr = &head;
     17        for ( node * nx = o.head; nx; nx = nx->next ) {
     18                *cr = new node{ *nx->value }; /***/
     19                cr = &(*cr)->next;
    2020        }
    21         *crnt = nullptr;
     21        *cr = nullptr;
    2222}
    2323
Note: See TracChangeset for help on using the changeset viewer.