Ignore:
Timestamp:
Apr 25, 2017, 8:21:10 AM (5 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
89a9be2
Parents:
b3d70eb
Message:

more cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/generic_types/evaluation/cpp-vstack.cpp

    rb3d70eb r6a8ac0b  
    66void stack::copy(const stack& o) {
    77        node** crnt = &head;
    8         node* next = o.head;
    9         while ( next ) {
     8        for ( node* next = o.head; next; next = next->next ) {
    109                *crnt = new node{ *next->value };
    1110                crnt = &(*crnt)->next;
    12                 next = next->next;
    1311        }
    1412        *crnt = nullptr;
     
    3533
    3634void stack::clear() {
    37         node* next = head;
    38         while ( next ) {
     35    for ( node* next = head; next; ) {
    3936                node* crnt = next;
    4037                next = crnt->next;
Note: See TracChangeset for help on using the changeset viewer.