aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2009-10-09 11:36:17 +0000
committerstuconnolly <stuart02@gmail.com>2009-10-09 11:36:17 +0000
commit5e07a85c324b753d7677b2d3e9e4e2b95ddb5a42 (patch)
tree3d37631390d7d4e33a4dd734fe3af599e9812013 /Source
parent520ea0973aa9e6f42cb2ff373dbd9bc25bfd2ec1 (diff)
downloadsequelpro-5e07a85c324b753d7677b2d3e9e4e2b95ddb5a42.tar.gz
sequelpro-5e07a85c324b753d7677b2d3e9e4e2b95ddb5a42.tar.bz2
sequelpro-5e07a85c324b753d7677b2d3e9e4e2b95ddb5a42.zip
Tiny performance improvement and cleaner code.
Diffstat (limited to 'Source')
-rw-r--r--Source/SPTableRelations.m6
1 files 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"]];
}
}