Changeset 153 for cpp/frams/model


Ignore:
Timestamp:
03/01/14 22:20:08 (7 years ago)
Author:
sz
Message:

SList container iteration: FOREACH() macro now creates local variable for maintaining the loop, removed the obsolete SList iteration implementation, replaced some unnecessarily complex for() with FOREACH()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/model/model.cpp

    r121 r153  
    135135void Model::clear()
    136136{
    137 Part *p;
    138 for (parts.start();p=(Part*)parts();) delete p;
    139 Joint* j;
    140 for (joints.start();j=(Joint*)joints();) delete j;
    141 Neuro *n;
    142 for (neurons.start();n=(Neuro*)neurons();) delete n;
     137FOREACH(Part*,p,parts)
     138        delete p;
     139FOREACH(Joint*,j,joints)
     140        delete j;
     141FOREACH(Neuro*,n,neurons)
     142        delete n;
    143143parts.clear(); joints.clear(); neurons.clear();
    144144delMap();
Note: See TracChangeset for help on using the changeset viewer.