Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/papers/general/Paper.tex

    r4c80a75 raa5fdac  
    28752875}
    28762876_Bool stack_empty( const stack * s ) {
    2877         return s->head == NULL;
     2877         return s->head == NULL;
    28782878}
    28792879void push_stack( stack * s, void * v ) {
    2880         node * n = malloc( sizeof(node) ); /***/
     2880        node * n = malloc(sizeof(node)); /***/
    28812881        *n = (node){ v, s->head }; /***/
    28822882        s->head = n;
     
    29082908        };
    29092909        struct stack { node(T) * head; };
    2910         void ?{}( stack(T) & s, stack(T) t ) { // copy
     2910        void ?{}( stack(T) & s ) { (s.head){ 0 }; }
     2911        void ?{}( stack(T) & s, stack(T) t ) {
    29112912                node(T) ** cr = &s.head;
    29122913                for ( node(T) * nx = t.head; nx; nx = nx->next ) {
     
    29222923                        nx = cr->next;
    29232924                        ^(*cr){};
    2924                         free( cr );
     2925                        free(cr);
    29252926                }
    29262927                head = 0;
    29272928        }
    2928 
    29292929\end{cfa}
    29302930&
    29312931\begin{cfa}[xleftmargin=0pt,aboveskip=0pt,belowskip=0pt]
    2932         void ?{}( stack(T) & s ) { (s.head){ 0 }; }
    29332932        void ^?{}( stack(T) & s) { clear( s ); }
    29342933        stack(T) ?=?( stack(T) & s, stack(T) t ) {
     
    29552954        }
    29562955}
     2956
    29572957\end{cfa}
    29582958\end{tabular}
     
    30033003                return *this;
    30043004        }
    3005         bool empty() const {
    3006                 return head == nullptr;
    3007         }
     3005        bool empty() const { return head == nullptr; }
    30083006        void push( const T & value ) {
    30093007                head = new node{ value, head };  /***/
     
    30173015        }
    30183016};
     3017
     3018
    30193019
    30203020\end{cfa}
     
    30663066                return *this;
    30673067        }
    3068         bool empty() const {
    3069                 return head == nullptr;
    3070         }
     3068        bool empty() const { return head == nullptr; }
    30713069        void push( const object & value ) {
    30723070                head = new node{ value, head }; /***/
     
    30813079};
    30823080
     3081
     3082
    30833083\end{cfa}
    30843084\end{tabular}
Note: See TracChangeset for help on using the changeset viewer.