Ignore:
Timestamp:
Apr 28, 2016, 2:38:18 PM (3 years ago)
Author:
cameron
Message:

Fix for inputFiles vector

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/icgrep.cpp

    r5000 r5015  
    3131static cl::opt<int> Threads("t", cl::desc("Total number of threads."), cl::init(1));
    3232
    33 static unsigned firstInputFile = 1;  // Normal case when first positional arg is a regex.
    3433static std::string allREs;
    3534static re::ModeFlagSet globalFlags = 0;
     
    5453    if (regexVector.size() == 0) {
    5554        regexVector.push_back(inputFiles[0]);
    56         firstInputFile = 1;
     55        inputFiles.erase(inputFiles.begin());
    5756    }
    58     else {
    59         firstInputFile = 0;
    60     }
    61    
    6257    if (CaseInsensitive) globalFlags |= re::CASE_INSENSITIVE_MODE_FLAG;
    6358
     
    148143    grepEngine.grepCodeGen(module_name, re_ast);
    149144
    150     initResult(inputFiles, firstInputFile, inputFiles.size());
     145    initResult(inputFiles);
    151146    if (Threads <= 1) {
    152         for (unsigned i = firstInputFile; i != inputFiles.size(); ++i) {
     147        for (unsigned i = 0; i != inputFiles.size(); ++i) {
    153148            grepEngine.doGrep(inputFiles[i]);
    154149        }       
Note: See TracChangeset for help on using the changeset viewer.