use HasField() rather than GetField() where appropriate

This commit is contained in:
Vern Paxson 2021-02-25 12:38:46 -08:00
parent 13e7ba3a00
commit 3f6f8e0709
3 changed files with 5 additions and 5 deletions

View file

@ -3009,7 +3009,7 @@ RecordValPtr RecordVal::CoerceTo(RecordTypePtr t,
}
for ( i = 0; i < ar_t->NumFields(); ++i )
if ( ! aggr->GetField(i) &&
if ( ! aggr->HasField(i) &&
! ar_t->FieldDecl(i)->GetAttr(detail::ATTR_OPTIONAL) )
{
char buf[512];