| 1005 | } |
| 1006 | |
| 1007 | static std::vector<std::string> externalRefs(const Method& method, |
| 1008 | const std::vector<Field>& fields) { |
| 1009 | std::vector<std::string> result; |
| 1010 | for (const auto& field : fields) { |
| 1011 | if (field.lenRef.empty() || containsField(fields, field.lenRef)) continue; |
| 1012 | if (std::find(result.begin(), result.end(), field.lenRef) == result.end()) |
| 1013 | result.push_back(field.lenRef); |
| 1014 | } |
| 1015 | return result; |
| 1016 | } |
| 1017 | |
| 1018 | static bool containsField(const std::vector<Field>& fields, std::string_view name) { |
| 1019 | return std::any_of(fields.begin(), fields.end(), |