aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPBundleEditorController.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2012-05-09 15:48:15 +0000
committerstuconnolly <stuart02@gmail.com>2012-05-09 15:48:15 +0000
commitb86ba6df28e4cde39bc1ba872d713c1fbbb87596 (patch)
treef85e6d8ee341596e4f671cf18a185b60f284a258 /Source/SPBundleEditorController.m
parentafbd3852fa962b3b4399b83ba33295c7621d04a8 (diff)
downloadsequelpro-b86ba6df28e4cde39bc1ba872d713c1fbbb87596.tar.gz
sequelpro-b86ba6df28e4cde39bc1ba872d713c1fbbb87596.tar.bz2
sequelpro-b86ba6df28e4cde39bc1ba872d713c1fbbb87596.zip
More gcc warning fixes.
Diffstat (limited to 'Source/SPBundleEditorController.m')
-rw-r--r--Source/SPBundleEditorController.m22
1 files changed, 10 insertions, 12 deletions
diff --git a/Source/SPBundleEditorController.m b/Source/SPBundleEditorController.m
index b807a52d..4be98c40 100644
--- a/Source/SPBundleEditorController.m
+++ b/Source/SPBundleEditorController.m
@@ -1222,31 +1222,30 @@
- (BOOL)outlineView:(id)outlineView isItemExpandable:(id)item
{
- if([item isKindOfClass:[NSDictionary class]] && [item objectForKey:kChildrenKey])
- return YES;
- return NO;
+ return [item isKindOfClass:[NSDictionary class]] && [item objectForKey:kChildrenKey];
}
- (NSInteger)outlineView:(id)outlineView numberOfChildrenOfItem:(id)item
{
- if(item == nil) item = commandBundleTree;
+ if (item == nil) item = commandBundleTree;
- if([item isKindOfClass:[NSDictionary class]])
- if([item objectForKey:kChildrenKey])
- return [[item objectForKey:kChildrenKey] count];
- else
- return [item count];
+ if ([item isKindOfClass:[NSDictionary class]]) {
+ return [item objectForKey:kChildrenKey] ? [[item objectForKey:kChildrenKey] count] : [item count];
+ }
- if([item isKindOfClass:[NSArray class]])
+ if ([item isKindOfClass:[NSArray class]]) {
return [item count];
+ }
return 0;
}
- (id)outlineView:(id)outlineView objectValueForTableColumn:(NSTableColumn *)tableColumn byItem:(id)item
{
- if(item && [[item representedObject] respondsToSelector:@selector(objectForKey:)])
+ if (item && [[item representedObject] respondsToSelector:@selector(objectForKey:)]) {
return [[item representedObject] objectForKey:kBundleNameKey];
+ }
+
return @"";
}
@@ -2129,4 +2128,3 @@
}
@end
-