MCPcopy Create free account
hub / github.com/T-Troll/alienfx-tools / FindCreateMapping

Method FindCreateMapping

alienfx-gui/ConfigHandler.cpp:70–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70groupset* ConfigHandler::FindCreateMapping(int groupID, profile* prof)
71{
72 if (groupID < 0) {
73 groupID = 0x1ffff;
74 }
75 if (!prof)
76 prof = activeProfile;
77 groupset* gset = FindMapping(groupID, &prof->lightsets);
78 if (!gset) {
79 FindCreateGroup(groupID);
80 modifyProfile.lockWrite();
81 prof->lightsets.push_back({ groupID });
82 modifyProfile.unlockWrite();
83 gset = &prof->lightsets.back();
84 }
85 return gset;
86}
87
88profile* ConfigHandler::FindProfile(int id) {
89 for (profile* prof : profiles)

Callers 1

FindCreateMappingGroupFunction · 0.80

Calls 2

lockWriteMethod · 0.80
unlockWriteMethod · 0.80

Tested by

no test coverage detected