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

Function parse

MyGUIEngine/include/MyGUI_WidgetStyle.h:38–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36 }
37
38 static WidgetStyle parse(std::string_view _value)
39 {
40 WidgetStyle type;
41 int value = 0;
42 while (true)
43 {
44 std::string_view name = type.getValueName(value);
45 if (name.empty() || name == _value)
46 break;
47 value++;
48 }
49 type.mValue = static_cast<Enum>(value);
50 return type;
51 }
52
53 friend bool operator==(WidgetStyle const& a, WidgetStyle const& b)
54 {

Callers 1

Calls 2

getValueNameMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected