sherpa is hosted by Hepforge, IPPP Durham
close Warning: Can't synchronize with repository "(default)" (/hepforge/svn/sherpa does not appear to be a Subversion repository.). Look in the Trac log for more information.

Ticket #300: iterator.patch

File iterator.patch, 1.2 KB (added by Frank Siegert, 10 years ago)
  • AHADIC++/Tools/Soft_Cluster_Handler.C

     
    558558  Single_Transition_Siter  start(stl->begin()),siter;
    559559  if (lighter) {
    560560    if (hadron!=Flavour(kf_none)) {
    561       do {
    562         if (start->first==hadron) {
    563           siter = start;
    564           siter--;
    565           if ((++siter)!=stl->end()) start++;
    566           else return 0.;
    567           break;
    568         }
    569         else start++;
    570       } while (start!=stl->end());
     561        siter=stl->find(hadron);
     562        if (siter == stl->end()) {
     563            return 0.;
     564        }
     565        else {
     566            start=siter;
     567            start++; // Jump to the next lightest hadron
     568        }
    571569    }
    572570    else {
    573571      for (siter=start;siter!=stl->end();siter++) {
  • AMISIC++/Main/MI_Base.C

     
    6060  for (String_MI_Base_Map::iterator nbit=s_bases->begin();
    6161       nbit!=s_bases->end();++nbit) {
    6262    if (nbit->first==m_name) {
    63       s_bases->erase(nbit--);
     63      s_bases->erase(nbit);
    6464      break;
    6565    }
    6666  }