Ignore:
Timestamp:
Mar 9, 2018, 1:08:32 PM (7 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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, resolv-new, with_gc
Children:
3d8f2f8
Parents:
81e8ab0 (diff), e59f0bf (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:

more changes

File:
1 edited

Legend:

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

    r81e8ab0 r8b001bd  
    1414        stack( stack<T> && o ) : head( o.head ) { o.head = nullptr; }
    1515
     16        void clear() {
     17                for ( node * next = head; next; ) {
     18                        node * crnt = next;
     19                        next = crnt->next;
     20                        delete crnt;
     21                }
     22                head = nullptr;
     23        }
     24
    1625        void copy( const stack<T> & o ) {
    1726                node ** crnt = &head;
     
    2130                }
    2231                *crnt = nullptr;
    23         }
    24 
    25         void clear() {
    26                 for ( node * next = head; next; ) {
    27                         node * crnt = next;
    28                         next = crnt->next;
    29                         delete crnt;
    30                 }
    31                 head = nullptr;
    3232        }
    3333
Note: See TracChangeset for help on using the changeset viewer.