Changeset 11346


Ignore:
Timestamp:
07/11/11 16:07:00 (13 years ago)
Author:
tbretz
Message:
Use Vec instead of Get
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/Main.h

    r11330 r11346  
    6767    boost::thread t(boost::bind(MainThread, &io_service, dummy));
    6868
    69     if (conf.Has("cmd"))
    70     {
    71         const vector<string> v = conf.Get<vector<string>>("cmd");
    72         for (vector<string>::const_iterator it=v.begin(); it!=v.end(); it++)
    73             shell.ProcessLine(*it);
    74     }
     69    const vector<string> v = conf.Vec<string>("cmd");
     70    for (vector<string>::const_iterator it=v.begin(); it!=v.end(); it++)
     71        shell.ProcessLine(*it);
    7572
    76     if (conf.Has("exec"))
    77     {
    78         const vector<string> v = conf.Get<vector<string>>("exec");
    79         for (vector<string>::const_iterator it=v.begin(); it!=v.end(); it++)
    80             shell.Execute(*it);
    81     }
     73    const vector<string> v = conf.Vec<string>("exec");
     74    for (vector<string>::const_iterator it=v.begin(); it!=v.end(); it++)
     75        shell.Execute(*it);
    8276
    8377    if (conf.Get<bool>("quit"))
Note: See TracChangeset for help on using the changeset viewer.