MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / mapWrap

Function mapWrap

Source/Node/AlignNode.cpp:101–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101std::optional<YGWrap> mapWrap(std::string_view wrap) {
102 switch (Switch::hash(wrap)) {
103 case "nowrap"_hash: return YGWrapNoWrap;
104 case "wrap"_hash: return YGWrapWrap;
105 case "wrap-reverse"_hash: return YGWrapWrapReverse;
106 }
107 Warn("invalid CSS Wrap: \"{}\", should be one of \"no-wrap\", \"wrap\" and \"wrap-reverse\"", wrap);
108 return std::nullopt;
109}
110
111std::optional<YGOverflow> mapOverflow(std::string_view overflow) {
112 switch (Switch::hash(overflow)) {

Callers 1

cssMethod · 0.85

Calls 2

hashFunction · 0.50
WarnFunction · 0.50

Tested by

no test coverage detected