MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / fakeBits

Function fakeBits

src/gui/explorerpanel.cc:12–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10#include "context.h"
11
12static Bytes fakeBits(const std::vector<bool>& bits)
13{
14 Bytes result;
15 ByteWriter bw(result);
16
17 auto it = bits.begin();
18 while (it != bits.end())
19 {
20 uint8_t b = (*it++) << 4;
21 if (it != bits.end())
22 b |= *it++;
23 bw.write_8(b);
24 }
25
26 return result;
27}
28
29class ExplorerPanelImpl :
30 public ExplorerPanelGen,

Callers 1

UpdateExplorerDataMethod · 0.85

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected