Changeset 16088 for trunk/FACT++/src


Ignore:
Timestamp:
05/23/13 19:08:42 (12 years ago)
Author:
tbretz
Message:
Use empty() instead of size() where possible; replaced queues by list where possible
Location:
trunk/FACT++/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/datalogger.cc

    r15407 r16088  
    15561556    for (list<RunNumberType>::const_iterator it=fRunNumber.begin(); it!=fRunNumber.end(); it++)
    15571557        str << " " << it->runNumber;
    1558     if (fRunNumber.size()==0)
     1558    if (fRunNumber.empty())
    15591559        str << " <none>";
    15601560    Message(str);
     
    16071607    for (set<string>::const_iterator it=fBlackList.begin(); it != fBlackList.end(); it++)
    16081608        Message(" -> "+*it);
    1609     if (fBlackList.size()==0)
     1609    if (fBlackList.empty())
    16101610        Message(" <empty>");
    16111611
     
    16131613    for (set<string>::const_iterator it=fWhiteList.begin(); it != fWhiteList.end(); it++)
    16141614        Message(" -> "+*it);
    1615     if (fWhiteList.size()==0)
     1615    if (fWhiteList.empty())
    16161616        Message(" <empty>");
    16171617
     
    16211621    for (set<string>::const_iterator it=fGrouping.begin(); it != fGrouping.end(); it++)
    16221622        Message(" -> "+*it);
    1623     if (fGrouping.size()==0)
     1623    if (fGrouping.empty())
    16241624        Message(" <no grouping>");
    16251625
  • trunk/FACT++/src/fitsdump.cc

    r15246 r16088  
    153153            fout << ::right << setw(20) << it->second.value;
    154154
    155         if (it->second.comment.size()>0)
     155        if (!it->second.comment.empty())
    156156            fout << " / " << it->second.comment;
    157157        fout << '\n';
     
    186186    const fits::Table::Columns &fColMap = GetColumns();
    187187
    188     if (names.size()==0)
     188    if (names.empty())
    189189        for (auto it=fColMap.begin(); it!=fColMap.end(); it++)
    190190            if (it->second.num>0)
     
    509509
    510510    const vector<MyColumn> vec = InitColumnsRoot(names);
    511     if (vec.size()==0)
     511    if (vec.empty())
    512512        return;
    513513
     
    825825
    826826    const vector<MyColumn> cols = InitColumns(conf.Vec<string>("col"));
    827     if (cols.size()==0)
     827    if (cols.empty())
    828828        return false;
    829829
  • trunk/FACT++/src/ftmctrl.cc

    r15186 r16088  
    23862386        // ---------- Setup clock conditioner frequencies ----------
    23872387        const vector<uint16_t> freq = conf.Vec<uint16_t>("clock-conditioner.frequency");
    2388         if (freq.size()==0)
     2388        if (freq.empty())
    23892389            T::Warn("No frequencies for the clock-conditioner defined.");
    23902390        else
     
    24322432        // ---------- Setup run types ---------
    24332433        const vector<string> types = conf.Vec<string>("run-type");
    2434         if (types.size()==0)
     2434        if (types.empty())
    24352435            T::Warn("No run-types defined.");
    24362436        else
  • trunk/FACT++/src/ratecontrol.cc

    r16081 r16088  
    100100        //    return;
    101101
    102         if (fThresholds.size()==0)
     102        if (!fThresholds.empty())
    103103            return;
    104104
     
    371371    int HandleTriggerRates(const EventImp &evt)
    372372    {
    373         if (fThresholds.size()==0)
     373        if (fThresholds.empty())
    374374            return GetCurrentState();
    375375
     
    804804        // ---------- Setup run types ---------
    805805        const vector<string> types = conf.Vec<string>("run-type");
    806         if (types.size()==0)
     806        if (types.empty())
    807807            Warn("No run-types defined.");
    808808        else
Note: See TracChangeset for help on using the changeset viewer.