Skip to content

Commit

Permalink
Group function pointers and blocks under the same "pragma mark"
Browse files Browse the repository at this point in the history
  • Loading branch information
0xced committed Mar 7, 2013
1 parent ccab24e commit ad7e7db
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Source/CDTypeController.m
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,19 @@ - (void)typeFormatter:(CDTypeFormatter *)typeFormatter didReferenceClassName:(NS

- (void)appendStructuresToString:(NSMutableString *)resultString;
{
if (self.hasUnknownFunctionPointers) {
if (self.hasUnknownFunctionPointers && self.hasUnknownBlocks) {
[resultString appendString:@"#pragma mark Function Pointers and Blocks\n\n"];
} else if (self.hasUnknownFunctionPointers) {
[resultString appendString:@"#pragma mark Function Pointers\n\n"];
} else if (self.hasUnknownBlocks) {
[resultString appendString:@"#pragma mark Blocks\n\n"];
}

if (self.hasUnknownFunctionPointers) {
[resultString appendFormat:@"typedef void (*CDUnknownFunctionPointerType)(void); // return type and parameters are unknown\n\n"];
}

if (self.hasUnknownBlocks) {
[resultString appendString:@"#pragma mark Blocks\n\n"];
[resultString appendFormat:@"typedef void (^CDUnknownBlockType)(void); // return type and parameters are unknown\n\n"];
}

Expand Down

0 comments on commit ad7e7db

Please sign in to comment.