MCPcopy Create free account
hub / github.com/chromium/crashpad / EntryKeyEquals

Method EntryKeyEquals

client/simple_string_dictionary.h:248–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246 }
247
248 static bool EntryKeyEquals(std::string_view key, const Entry& entry) {
249 if (key.size() >= KeySize)
250 return false;
251
252 // Test for a NUL terminator and early out if it's absent.
253 if (entry.key[key.size()] != '\0')
254 return false;
255
256 // As there's a NUL terminator at the right position in the entries
257 // string, strncmp can do the rest.
258 return strncmp(key.data(), entry.key, key.size()) == 0;
259 }
260
261 const Entry* GetConstEntryForKey(std::string_view key) const {
262 for (size_t i = 0; i < num_entries; ++i) {

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected