MCPcopy Create free account
hub / github.com/bytedance/Fastbot_Android / RichWidget

Method RichWidget

native/desc/reuse/RichWidget.cpp:19–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17
18
19 RichWidget::RichWidget(WidgetPtr parent, const ElementPtr &element)
20 : Widget(std::move(parent), element) {
21 uintptr_t hashcode1 = std::hash<std::string>{}(this->_clazz);
22 uintptr_t hashcode2 = std::hash<std::string>{}(this->_resourceID);
23 uintptr_t hashcode3 = 0x1;
24 for (int i: this->getActions()) {
25 hashcode3 ^= (127U * std::hash<int>{}(i));
26 }
27 this->_widgetHashcode = ((hashcode1 ^ (hashcode2 << 4)) >> 2) ^ ((127U * hashcode3 << 1));
28 std::string elementText = this->getValidTextFromWidgetAndChildren(element);
29 if (!elementText.empty())
30 this->_widgetHashcode ^= (0x79b9 + (std::hash<std::string>{}(elementText) << 1));
31
32 }
33
34 std::string RichWidget::getValidTextFromWidgetAndChildren(const ElementPtr &element) const {
35 std::string txt = element->validText;

Callers

nothing calls this directly

Calls 3

getActionsMethod · 0.80
emptyMethod · 0.80

Tested by

no test coverage detected