MCPcopy Create free account
hub / github.com/SIPp/sipp / reIndex

Method reIndex

src/infile.cpp:347–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

345}
346
347void FileContents::reIndex(int line)
348{
349 if (indexField == -1) {
350 return;
351 }
352 assert(line >= 0);
353 assert(line < realLinesInFile);
354
355 char tmp[SIPP_MAX_MSG_SIZE];
356 getField(line, indexField, tmp, SIPP_MAX_MSG_SIZE);
357 str_int_map::iterator index_it = indexMap->find(str_int_map::key_type(tmp));
358 if (index_it != indexMap->end()) {
359 indexMap->erase(index_it);
360 }
361 indexMap->insert(std::pair<str_int_map::key_type,int>(str_int_map::key_type(tmp), line));
362}
363
364void FileContents::deIndex(int line)
365{

Callers

nothing calls this directly

Calls 2

findMethod · 0.80
insertMethod · 0.80

Tested by

no test coverage detected