| 704 | } |
| 705 | |
| 706 | int NodeTree::computeStructAlignment(uint64_t structId) const { |
| 707 | int idx = indexOfId(structId); |
| 708 | if (idx < 0) return 1; |
| 709 | int maxAlign = 1; |
| 710 | QVector<int> kids = childrenOf(structId); |
| 711 | for (int ci : kids) { |
| 712 | const Node& c = nodes[ci]; |
| 713 | if (c.kind == NodeKind::Struct || c.kind == NodeKind::Array) { |
| 714 | maxAlign = qMax(maxAlign, computeStructAlignment(c.id)); |
| 715 | } else { |
| 716 | maxAlign = qMax(maxAlign, alignmentFor(c.kind)); |
| 717 | } |
| 718 | } |
| 719 | return maxAlign; |
| 720 | } |
| 721 | |
| 722 | } // namespace rcx |