============ idVarDef::DepthOfScope ============ */
| 619 | ============ |
| 620 | */ |
| 621 | int idVarDef::DepthOfScope( const idVarDef *otherScope ) const { |
| 622 | const idVarDef *def; |
| 623 | int depth; |
| 624 | |
| 625 | depth = 1; |
| 626 | for( def = otherScope; def != NULL; def = def->scope ) { |
| 627 | if ( def == scope ) { |
| 628 | return depth; |
| 629 | } |
| 630 | depth++; |
| 631 | } |
| 632 | |
| 633 | return 0; |
| 634 | } |
| 635 | |
| 636 | /* |
| 637 | ============ |