| 544 | } |
| 545 | |
| 546 | const Structure::FieldDeclaration * Structure::findField ( const string & na ) const { |
| 547 | if ( fieldLookup.size()==fields.size() ) { |
| 548 | auto it = fieldLookup.find(na); |
| 549 | if ( it == fieldLookup.end() ) return nullptr; |
| 550 | return &fields[it->second]; |
| 551 | } else { |
| 552 | for ( const auto & fd : fields ) { |
| 553 | if ( fd.name==na ) { |
| 554 | return &fd; |
| 555 | } |
| 556 | } |
| 557 | } |
| 558 | return nullptr; |
| 559 | } |
| 560 | |
| 561 | const Structure * Structure::findFieldParent ( const string & na ) const { |
| 562 | if ( parent ) { |