============ idProgram::FindFreeResultDef ============ */
| 1473 | ============ |
| 1474 | */ |
| 1475 | idVarDef *idProgram::FindFreeResultDef( idTypeDef *type, const char *name, idVarDef *scope, const idVarDef *a, const idVarDef *b ) { |
| 1476 | idVarDef *def; |
| 1477 | |
| 1478 | for( def = GetDefList( name ); def != NULL; def = def->Next() ) { |
| 1479 | if ( def == a || def == b ) { |
| 1480 | continue; |
| 1481 | } |
| 1482 | if ( def->TypeDef() != type ) { |
| 1483 | continue; |
| 1484 | } |
| 1485 | if ( def->scope != scope ) { |
| 1486 | continue; |
| 1487 | } |
| 1488 | if ( def->numUsers <= 1 ) { |
| 1489 | continue; |
| 1490 | } |
| 1491 | return def; |
| 1492 | } |
| 1493 | |
| 1494 | return AllocDef( type, name, scope, false ); |
| 1495 | } |
| 1496 | |
| 1497 | /* |
| 1498 | ================ |
no test coverage detected