MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / has_index

Method has_index

extern/re2/re2/sparse_array.h:349–358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

347// Check whether index i is in the array.
348template<typename Value>
349bool SparseArray<Value>::has_index(int i) const {
350 assert(i >= 0);
351 assert(i < max_size());
352 if (static_cast<uint32_t>(i) >= static_cast<uint32_t>(max_size())) {
353 return false;
354 }
355 // Unsigned comparison avoids checking sparse_[i] < 0.
356 return (uint32_t)sparse_[i] < (uint32_t)size_ &&
357 dense_[sparse_[i]].index_ == i;
358}
359
360template<typename Value>
361void SparseArray<Value>::create_index(int i) {

Callers 6

MarkSuccessorsMethod · 0.80
MarkDominatorMethod · 0.80
EmitListMethod · 0.80
AddToThreadqMethod · 0.80
FanoutMethod · 0.80
PropagateMatchMethod · 0.80

Calls 1

assertClass · 0.85

Tested by

no test coverage detected