Lines Matching refs:name
19 static uint32_t ComputeHash(std::string_view name) { in ComputeHash() argument
20 return static_cast<uint32_t>(std::hash<std::string_view>{}(name)); in ComputeHash()
25 auto name = reinterpret_cast<const char*>(start + entry.name_offset); in ToStringView() local
26 return std::string_view{name, entry.name_length}; in ToStringView()
32 std::string_view name, const uint8_t* start) const { in GetCdEntryOffset() argument
33 const uint32_t hash = ComputeHash(name); in GetCdEntryOffset()
38 if (ToStringView(hash_table_[ent], start) == name) { in GetCdEntryOffset()
44 ALOGV("Zip: Unable to find entry %.*s", static_cast<int>(name.size()), name.data()); in GetCdEntryOffset()
49 ZipError CdEntryMapZip32<ZipStringOffset>::AddToMap(std::string_view name, const uint8_t* start) { in AddToMap() argument
50 const uint64_t hash = ComputeHash(name); in AddToMap()
58 if (ToStringView(hash_table_[ent], start) == name) { in AddToMap()
60 ALOGW("Zip: Found duplicate entry %.*s", static_cast<int>(name.size()), name.data()); in AddToMap()
68 hash_table_[ent].name_offset = static_cast<uint32_t>(name.data() - start_char); in AddToMap()
69 hash_table_[ent].name_length = static_cast<uint16_t>(name.size()); in AddToMap()
93 ZipError CdEntryMapZip64::AddToMap(std::string_view name, const uint8_t* start) { in AddToMap() argument
95 entry_table_.insert({name, name.data() - reinterpret_cast<const char*>(start)}); in AddToMap()
97 ALOGW("Zip: Found duplicate entry %.*s", static_cast<int>(name.size()), name.data()); in AddToMap()
103 std::pair<ZipError, uint64_t> CdEntryMapZip64::GetCdEntryOffset(std::string_view name, in GetCdEntryOffset() argument
105 const auto it = entry_table_.find(name); in GetCdEntryOffset()
107 ALOGV("Zip: Could not find entry %.*s", static_cast<int>(name.size()), name.data()); in GetCdEntryOffset()