Lines Matching refs:name
39 static uint32_t ComputeHash(std::string_view name) { in ComputeHash() argument
40 return static_cast<uint32_t>(std::hash<std::string_view>{}(name)); in ComputeHash()
44 std::pair<ZipError, uint64_t> CdEntryMapZip32::GetCdEntryOffset(std::string_view name, in GetCdEntryOffset() argument
46 const uint32_t hash = ComputeHash(name); in GetCdEntryOffset()
51 if (hash_table_[ent].ToStringView(start) == name) { in GetCdEntryOffset()
57 ALOGV("Zip: Unable to find entry %.*s", static_cast<int>(name.size()), name.data()); in GetCdEntryOffset()
61 ZipError CdEntryMapZip32::AddToMap(std::string_view name, const uint8_t* start) { in AddToMap() argument
62 const uint64_t hash = ComputeHash(name); in AddToMap()
70 if (hash_table_[ent].ToStringView(start) == name) { in AddToMap()
72 ALOGW("Zip: Found duplicate entry %.*s", static_cast<int>(name.size()), name.data()); in AddToMap()
80 hash_table_[ent].name_offset = static_cast<uint32_t>(name.data() - start_char); in AddToMap()
81 hash_table_[ent].name_length = static_cast<uint16_t>(name.size()); in AddToMap()
125 ZipError CdEntryMapZip64::AddToMap(std::string_view name, const uint8_t* start) { in AddToMap() argument
127 entry_table_.insert({name, name.data() - reinterpret_cast<const char*>(start)}); in AddToMap()
129 ALOGW("Zip: Found duplicate entry %.*s", static_cast<int>(name.size()), name.data()); in AddToMap()
135 std::pair<ZipError, uint64_t> CdEntryMapZip64::GetCdEntryOffset(std::string_view name, in GetCdEntryOffset() argument
137 const auto it = entry_table_.find(name); in GetCdEntryOffset()
139 ALOGV("Zip: Could not find entry %.*s", static_cast<int>(name.size()), name.data()); in GetCdEntryOffset()