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

Method contains

extern/re2/re2/sparse_set.h:220–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218// Check whether index i is in the set.
219template<typename Value>
220bool SparseSetT<Value>::contains(int i) const {
221 assert(i >= 0);
222 assert(i < max_size());
223 if (static_cast<uint32_t>(i) >= static_cast<uint32_t>(max_size())) {
224 return false;
225 }
226 // Unsigned comparison avoids checking sparse_[i] < 0.
227 return (uint32_t)sparse_[i] < (uint32_t)size_ &&
228 dense_[sparse_[i]] == i;
229}
230
231template<typename Value>
232void SparseSetT<Value>::create_index(int i) {

Callers 5

MarkSuccessorsMethod · 0.45
MarkDominatorMethod · 0.45
EmitListMethod · 0.45
AddToQueueMethod · 0.45
AddQFunction · 0.45

Calls 1

assertClass · 0.85

Tested by

no test coverage detected