MCPcopy Create free account
hub / github.com/alibaba/PhotonLibOS / get_bit

Method get_bit

common/unordered_inline_set.h:19–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17 T* _ptr = nullptr;
18 size_t _capacity = 0, _size = 0;
19 bool get_bit(size_t i) const {
20 auto c = (char*)_ptr - i / 8 - 1;
21 return *c & (1 << (i % 8));
22 }
23 void set_bit(size_t i) {
24 auto c = (char*)_ptr - i / 8 - 1;
25 *c |= (1 << (i % 8));

Callers 1

extractMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected