MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / CheckIndex

Method CheckIndex

Bcore/src/main/cpp/dex/bytecode_utils.h:45–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43 }
44
45 void CheckIndex(size_t index) const {
46 if (sparse_) {
47 // In a sparse table, we have num_entries_ keys and num_entries_ values, in that order.
48 DCHECK_LT(index, 2 * static_cast<size_t>(num_entries_));
49 } else {
50 // In a packed table, we have the starting key and num_entries_ values.
51 DCHECK_LT(index, 1 + static_cast<size_t>(num_entries_));
52 }
53 }
54
55 int32_t GetEntryAt(size_t index) const {
56 CheckIndex(index);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected