Changeset 170


Ignore:
Timestamp:
03/13/14 00:36:07 (11 years ago)
Author:
sz
Message:

removed the confusing SList operator!()

Location:
cpp/frams
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/genetics/f1/conv_f1.cpp

    r139 r170  
    302302        g++;
    303303        }
    304 return !out;
     304return out.size();
    305305}
    306306
  • cpp/frams/genetics/oper_fx.cpp

    r168 r170  
    182182        for (int i = 0; i < Neuro::getClassCount(); i++)
    183183                if (Neuro::getClass(i)->genactive) active += Neuro::getClass(i);
    184         if (!active == 0) return NULL; else return active(randomN(!active));
     184        if (active.size() == 0) return NULL; else return active(randomN(active.size()));
    185185}
    186186
  • cpp/frams/util/list.h

    r153 r170  
    128128void hardclear() {resize(0); used=0;} ///< remove all elements and free mem
    129129int size() const {return used;} ///< list size
    130 int operator!() {return used;} ///< list size
    131130void operator=(const SListTempl<T>&src) ///duplicate
    132131 {
Note: See TracChangeset for help on using the changeset viewer.