Changes in src/InitTweak/InitTweak.cc [7c3f3be:29bc63e]
- File:
-
- 1 edited
-
src/InitTweak/InitTweak.cc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/InitTweak.cc
r7c3f3be r29bc63e 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 286 272 bool tryConstruct( DeclarationWithType * dwt ) { 287 273 ObjectDecl * objDecl = dynamic_cast< ObjectDecl * >( dwt );
Note:
See TracChangeset
for help on using the changeset viewer.