============ idCompiler::VirtualFunctionConstant Creates a def for an index into a virtual function table ============ */
| 286 | ============ |
| 287 | */ |
| 288 | ID_INLINE idVarDef *idCompiler::VirtualFunctionConstant( idVarDef *func ) { |
| 289 | eval_t eval; |
| 290 | |
| 291 | memset( &eval, 0, sizeof( eval ) ); |
| 292 | eval._int = func->scope->TypeDef()->GetFunctionNumber( func->value.functionPtr ); |
| 293 | if ( eval._int < 0 ) { |
| 294 | Error( "Function '%s' not found in scope '%s'", func->Name(), func->scope->Name() ); |
| 295 | } |
| 296 | |
| 297 | return GetImmediate( &type_virtualfunction, &eval, "" ); |
| 298 | } |
| 299 | |
| 300 | /* |
| 301 | ============ |
nothing calls this directly
no test coverage detected