Changes in src/InitTweak/InitTweak.cc [29bc63e:7c3f3be]
- File:
-
- 1 edited
-
src/InitTweak/InitTweak.cc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/InitTweak.cc
r29bc63e r7c3f3be 270 270 } 271 271 272 Type * getThisType( FunctionType * ftype ) { 273 assertf( ftype, "getThisType: nullptr ftype" ); 274 ObjectDecl * thisParam = getThisParam( ftype ); 275 ReferenceType * refType = strict_dynamic_cast< ReferenceType * >( thisParam->type ); 276 return refType->base; 277 } 278 279 ObjectDecl * getThisParam( FunctionType * ftype ) { 280 assertf( ftype, "getThisParam: nullptr ftype" ); 281 auto & params = ftype->parameters; 282 assertf( ! params.empty(), "getThisParam: ftype with 0 parameters: %s", toString( ftype ).c_str() ); 283 return strict_dynamic_cast< ObjectDecl * >( params.front() ); 284 } 285 272 286 bool tryConstruct( DeclarationWithType * dwt ) { 273 287 ObjectDecl * objDecl = dynamic_cast< ObjectDecl * >( dwt );
Note:
See TracChangeset
for help on using the changeset viewer.