MCPcopy Create free account
hub / github.com/Snapchat/Valdi / setClass

Method setClass

valdi/src/valdi/runtime/CSS/CSSNode.cpp:64–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64bool CSSNode::setClass(const StringBox& cssClass) {
65 if (_cssClass == cssClass) {
66 return false;
67 }
68
69 _cssClass = cssClass;
70 _resolvedCssClasses.clear();
71
72 forEachCSSClass(cssClass, [&](StringBox cssClass) { _resolvedCssClasses.emplace(std::move(cssClass)); });
73
74 return true;
75}
76
77bool CSSNode::setNodeId(const StringBox& nodeId) {
78 if (_nodeId == nodeId) {

Callers 1

setCSSClassMethod · 0.80

Calls 3

forEachCSSClassFunction · 0.85
clearMethod · 0.65
emplaceMethod · 0.45

Tested by

no test coverage detected