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

Function isCompatibleCast

src/simulate/debug_info.cpp:487–502  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

485 }
486
487 bool isCompatibleCast ( const StructInfo * THIS, const StructInfo * castS ) {
488 if ( castS->count < THIS->count ) {
489 return false;
490 }
491 for ( uint32_t i=0, is=THIS->count; i!=is; ++i ) {
492 VarInfo * fd = THIS->fields[i];
493 VarInfo * cfd = castS->fields[i];
494 if ( strcmp(fd->name,cfd->name)!=0 ) {
495 return false;
496 }
497 if ( !isSameType(fd,cfd,RefMatters::yes, ConstMatters::yes, TemporaryMatters::yes,true) ) {
498 return false;
499 }
500 }
501 return true;
502 }
503
504 string debug_type ( const TypeInfo * info ) {
505 if ( !info ) return "";

Callers

nothing calls this directly

Calls 1

isSameTypeFunction · 0.85

Tested by

no test coverage detected