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-stack.hpp

    rb3d70eb r6a8ac0b  
    1313        void copy(const stack<T>& o) {
    1414                node** crnt = &head;
    15                 node* next = o.head;
    16                 while ( next ) {
     15                for ( node* next = o.head; next; next = next->next ) {
    1716                        *crnt = new node{ next->value }; /***/
    1817                        crnt = &(*crnt)->next;
    19                         next = next->next;
    2018                }
    2119                *crnt = nullptr;
     
    2321public:
    2422        void clear() {
    25                 node* next = head;
    26                 while ( next ) {
     23            for ( node* next = head; next; ) {
    2724                        node* crnt = next;
    2825                        next = crnt->next;
Note: See TracChangeset for help on using the changeset viewer.