MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / findField

Method findField

src/ast/ast.cpp:546–559  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 ) {

Callers 15

touchMethod · 0.45
ast_structureDeclarationFunction · 0.45
ast_structVarDefFunction · 0.45
reportMethodVsCallMethod · 0.45
visitStructureFieldMethod · 0.45
visitMethod · 0.45
findMethodFunctionMethod · 0.45
makeClassRttiFunction · 0.45
makeClassFinalizeFunction · 0.45
setRefSpMethod · 0.45

Calls 3

sizeMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by 1

touchMethod · 0.36