| 532 | } |
| 533 | |
| 534 | Structure::FieldDeclarationRef Structure::findFieldRef ( const string & fieldName ) const { |
| 535 | auto pField = findField(fieldName); |
| 536 | if ( pField ) { |
| 537 | FieldDeclarationRef ref; |
| 538 | ref.owner = const_cast<Structure *>(this); |
| 539 | ref.index = int32_t(pField - &fields[0]); |
| 540 | return ref; |
| 541 | } else { |
| 542 | return FieldDeclarationRef{}; |
| 543 | } |
| 544 | } |
| 545 | |
| 546 | const Structure::FieldDeclaration * Structure::findField ( const string & na ) const { |
| 547 | if ( fieldLookup.size()==fields.size() ) { |