Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Statement.cc

    r145f1fc r2871210  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Jul 15 14:57:40 2015
    13 // Update Count     : 27
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Mon Jun 29 17:37:10 2015
     13// Update Count     : 22
    1414//
    1515
     
    192192}
    193193
    194 ForStmt::ForStmt( std::list<Label> labels, std::list<Statement *> initialization_, Expression *condition_, Expression *increment_, Statement *body_ ):
     194ForStmt::ForStmt( std::list<Label> labels, Statement *initialization_, Expression *condition_, Expression *increment_, Statement *body_ ):
    195195        Statement( labels ), initialization( initialization_ ), condition( condition_ ), increment( increment_ ), body( body_ ) {
    196196}
    197197
    198198ForStmt::~ForStmt() {
    199         deleteAll( initialization );
     199        delete initialization;
    200200        delete condition;
    201201        delete increment;
     
    213213
    214214        os << string( indent + 2, ' ' ) << "initialization: \n";
    215         for ( std::list<Statement *>::const_iterator it = initialization.begin(); it != initialization.end(); ++it ) {
    216                 (*it)->print( os, indent + 4 );
    217         }
     215        if ( initialization != 0 )
     216                initialization->print( os, indent + 4 );
    218217
    219218        os << "\n" << string( indent + 2, ' ' ) << "condition: \n";
Note: See TracChangeset for help on using the changeset viewer.