MCPcopy Create free account
hub / github.com/ClassicOldSong/Apollo / alloc_id

Function alloc_id

src/input.cpp:61–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59
60 template<std::size_t N>
61 int alloc_id(std::bitset<N> &gamepad_mask) {
62 for (int x = 0; x < gamepad_mask.size(); ++x) {
63 if (!gamepad_mask[x]) {
64 gamepad_mask[x] = true;
65 return x;
66 }
67 }
68
69 return -1;
70 }
71
72 template<std::size_t N>
73 void free_id(std::bitset<N> &gamepad_mask, int id) {

Callers 1

passthroughFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected