MCPcopy Create free account
hub / github.com/cathery/sys-con / getUniqueId

Function getUniqueId

source/ControllerSwitch/SwitchAbstractedPadHandler.cpp:53–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51static std::array<bool, 8> uniqueIDs{};
52
53static s8 getUniqueId()
54{
55 for (s8 i = 0; i != 8; ++i)
56 {
57 if (uniqueIDs[i] == false)
58 {
59 uniqueIDs[i] = true;
60 return i;
61 }
62 }
63 return 0;
64}
65
66static void freeUniqueId(s8 id)
67{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected