MCPcopy Create free account
hub / github.com/LabSound/LabSound / enumFromName

Method enumFromName

include/LabSound/core/AudioSetting.h:60–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58 char const * const * enums() const { return _desc->enums; }
59
60 int enumFromName(char const* const e)
61 {
62 if (!_desc->enums || !e)
63 return -1;
64
65 int enum_idx = 0;
66 for (char const* const* names_p = _desc->enums; *names_p != nullptr; ++names_p, ++enum_idx)
67 {
68 if (!strcmp(e, *names_p))
69 return enum_idx;
70 }
71 return -1;
72 }
73
74 bool valueBool() const { return _valb; }
75 float valueFloat() const { return _valf; }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected