MCPcopy Create free account
hub / github.com/MyGUI/mygui / parse

Function parse

MyGUIEngine/include/MyGUI_MenuItemType.h:30–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28 }
29
30 static MenuItemType parse(std::string_view _value)
31 {
32 MenuItemType type;
33 int value = 0;
34 while (true)
35 {
36 std::string_view name = type.getValueName(value);
37 if (name.empty() || name == _value)
38 break;
39 value++;
40 }
41 type.mValue = static_cast<Enum>(value);
42 return type;
43 }
44
45 friend bool operator==(MenuItemType const& a, MenuItemType const& b)
46 {

Callers 1

Calls 2

getValueNameMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected