MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / is_event_array_equal

Method is_event_array_equal

core/input/shortcut.cpp:120–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120bool Shortcut::is_event_array_equal(const Array &p_event_array1, const Array &p_event_array2) {
121 if (p_event_array1.size() != p_event_array2.size()) {
122 return false;
123 }
124
125 bool is_same = true;
126 for (int i = 0; i < p_event_array1.size(); i++) {
127 Ref<InputEvent> ie_1 = p_event_array1[i];
128 Ref<InputEvent> ie_2 = p_event_array2[i];
129
130 is_same = ie_1->is_match(ie_2);
131
132 // Break on the first that doesn't match - don't need to check further.
133 if (!is_same) {
134 break;
135 }
136 }
137
138 return is_same;
139}

Callers 1

test_shortcut.hFile · 0.80

Calls 2

is_matchMethod · 0.80
sizeMethod · 0.65

Tested by

no test coverage detected