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

Method lookup

src/infile.cpp:300–314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

298}
299
300int FileContents::lookup(char *key)
301{
302 if (indexField == -1) {
303 ERROR("Invalid Index File: %s", fileName);
304 }
305 if (!indexMap) {
306 ERROR("Invalid Index File: %s", fileName);
307 }
308
309 str_int_map::iterator index_it = indexMap->find(key);
310 if (index_it == indexMap->end()) {
311 return -1;
312 }
313 return index_it->second;
314}
315
316
317void FileContents::insert(char *value)

Callers 1

executeActionMethod · 0.80

Calls 2

ERRORFunction · 0.85
findMethod · 0.80

Tested by

no test coverage detected