From 5e07a85c324b753d7677b2d3e9e4e2b95ddb5a42 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Fri, 9 Oct 2009 11:36:17 +0000 Subject: Tiny performance improvement and cleaner code. --- Source/SPTableRelations.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/SPTableRelations.m b/Source/SPTableRelations.m index d83d7ec5..5c51fcbc 100644 --- a/Source/SPTableRelations.m +++ b/Source/SPTableRelations.m @@ -397,10 +397,10 @@ NSMutableArray *validColumns = [NSMutableArray array]; // Only add columns of the same data type - for (int i = 0; i < [columns count]; i++) + for (NSDictionary *column in columns) { - if ([[columnInfo objectForKey:@"type"] isEqualToString:[[columns objectAtIndex:i] objectForKey:@"type"]]) { - [validColumns addObject:[[columns objectAtIndex:i] objectForKey:@"name"]]; + if ([[columnInfo objectForKey:@"type"] isEqualToString:[column objectForKey:@"type"]]) { + [validColumns addObject:[column objectForKey:@"name"]]; } } -- cgit v1.2.3