| 339 | } |
| 340 | |
| 341 | bool ExprNode::sameAs(const ExprNode* other, bool ignoreStreams) const |
| 342 | { |
| 343 | if (!other || other->getType() != getType()) |
| 344 | return false; |
| 345 | |
| 346 | NodeRefsHolder thisHolder; |
| 347 | getChildren(thisHolder, false); |
| 348 | |
| 349 | NodeRefsHolder otherHolder; |
| 350 | other->getChildren(otherHolder, false); |
| 351 | |
| 352 | size_t count = thisHolder.refs.getCount(); |
| 353 | if (otherHolder.refs.getCount() != count) |
| 354 | return false; |
| 355 | |
| 356 | const auto* j = otherHolder.refs.begin(); |
| 357 | |
| 358 | for (const auto i : thisHolder.refs) |
| 359 | { |
| 360 | if (!*i && !**j) |
| 361 | continue; |
| 362 | |
| 363 | if (!*i || !**j || !(*i)->sameAs(**j, ignoreStreams)) |
| 364 | return false; |
| 365 | |
| 366 | ++j; |
| 367 | } |
| 368 | |
| 369 | return true; |
| 370 | } |
| 371 | |
| 372 | bool ExprNode::deterministic() const |
| 373 | { |
no test coverage detected