Ignore:
Timestamp:
Dec 3, 2007, 8:32:55 PM (14 years ago)
Author:
Peter
Message:

correcting OptionSwitch? so it actually listens to commandline. Also removed a possible out of range bug.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/OptionSwitch.cc

    r981 r996  
    4242                              std::vector<std::string>::iterator last)
    4343  {   
     44    if (long_name().size()>3 && long_name().substr(0,3)!="no-")
     45      switch_=false;
     46    else
     47      switch_=true;
    4448    do_parse2(first, last);
    4549  }
     
    5761    if (long_name().size()){
    5862      str = " --";
    59       if (def_ && long_name().substr(0,3)!="no-")
     63      if (def_ && long_name().size()>3 && long_name().substr(0,3)!="no-")
    6064        str += "no-";
    6165      str += long_name();
Note: See TracChangeset for help on using the changeset viewer.