Ignore:
Timestamp:
Apr 29, 2016, 4:05:57 PM (3 years ago)
Author:
lindanl
Message:

Passing file index instead of file name as internal state.

File:
1 edited

Legend:

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

    r5015 r5017  
    146146
    147147extern "C" {
    148     void wrapped_report_match(uint64_t lineNum, uint64_t line_start, uint64_t line_end, const char * buffer, uint64_t filesize, char * filename) {
    149 
    150         int idx = 0;
    151         for (int i=0; i<inputFiles.size(); i++){
    152             if (inputFiles[i] == filename){
    153                 idx = i;
    154                 break;
    155             }
    156         }
     148    void wrapped_report_match(uint64_t lineNum, uint64_t line_start, uint64_t line_end, const char * buffer, uint64_t filesize, int fileIdx) {
     149
     150        int idx = fileIdx;
    157151
    158152        if(CountOnly){
     
    162156
    163157        if (ShowFileNames) {
    164             resultStrs[idx] << filename << ':';
     158            resultStrs[idx] << inputFiles[idx] << ':';
    165159        }
    166160        if (ShowLineNumbers) {
Note: See TracChangeset for help on using the changeset viewer.