aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2012-05-09 11:54:15 +0000
committerstuconnolly <stuart02@gmail.com>2012-05-09 11:54:15 +0000
commit9131db394c46f10260fcec1a1df5216b140e2bc2 (patch)
treec22c7f4d75eae131ccb9f44f00f3675d7076b500 /Source
parent688da863bf88089d5bea4a6982b8eb59a578491c (diff)
downloadsequelpro-9131db394c46f10260fcec1a1df5216b140e2bc2.tar.gz
sequelpro-9131db394c46f10260fcec1a1df5216b140e2bc2.tar.bz2
sequelpro-9131db394c46f10260fcec1a1df5216b140e2bc2.zip
Fix gcc warnings.
Diffstat (limited to 'Source')
-rw-r--r--Source/SPConnectionControllerDataSource.m4
-rw-r--r--Source/SPConnectionControllerDelegate.m20
-rw-r--r--Source/SPDatabaseStructure.m2
3 files changed, 13 insertions, 13 deletions
diff --git a/Source/SPConnectionControllerDataSource.m b/Source/SPConnectionControllerDataSource.m
index 91fd6398..e7fea0c6 100644
--- a/Source/SPConnectionControllerDataSource.m
+++ b/Source/SPConnectionControllerDataSource.m
@@ -45,11 +45,11 @@
return [[node childNodes] count];
}
-- (id)outlineView:(NSOutlineView *)outlineView child:(NSInteger)index ofItem:(id)item
+- (id)outlineView:(NSOutlineView *)outlineView child:(NSInteger)childIndex ofItem:(id)item
{
SPTreeNode *node = (item == nil ? favoritesRoot : (SPTreeNode *)item);
- return NSArrayObjectAtIndex([node childNodes], index);
+ return NSArrayObjectAtIndex([node childNodes], childIndex);
}
- (BOOL)outlineView:(NSOutlineView *)outlineView isItemExpandable:(id)item
diff --git a/Source/SPConnectionControllerDelegate.m b/Source/SPConnectionControllerDelegate.m
index bc6800c3..35b69aeb 100644
--- a/Source/SPConnectionControllerDelegate.m
+++ b/Source/SPConnectionControllerDelegate.m
@@ -191,15 +191,15 @@ static NSString *SPDatabaseImage = @"database-small";
return result;
}
-- (NSDragOperation)outlineView:(NSOutlineView *)outlineView validateDrop:(id <NSDraggingInfo>)info proposedItem:(id)item proposedChildIndex:(NSInteger)index
+- (NSDragOperation)outlineView:(NSOutlineView *)outlineView validateDrop:(id <NSDraggingInfo>)info proposedItem:(id)item proposedChildIndex:(NSInteger)childIndex
{
NSDragOperation result = NSDragOperationNone;
// Prevent dropping favorites on other favorites (non-groups)
- if ((index == NSOutlineViewDropOnItemIndex) && (![item isGroup])) return result;
+ if ((childIndex == NSOutlineViewDropOnItemIndex) && (![item isGroup])) return result;
if ([info draggingSource] == outlineView) {
- [outlineView setDropItem:item dropChildIndex:index];
+ [outlineView setDropItem:item dropChildIndex:childIndex];
result = NSDragOperationMove;
}
@@ -207,7 +207,7 @@ static NSString *SPDatabaseImage = @"database-small";
return result;
}
-- (BOOL)outlineView:(NSOutlineView *)outlineView acceptDrop:(id <NSDraggingInfo>)info item:(id)item childIndex:(NSInteger)index
+- (BOOL)outlineView:(NSOutlineView *)outlineView acceptDrop:(id <NSDraggingInfo>)info item:(id)item childIndex:(NSInteger)childIndex
{
BOOL acceptedDrop = NO;
@@ -231,13 +231,13 @@ static NSString *SPDatabaseImage = @"database-small";
if (![draggedNodes count]) return acceptedDrop;
if ([node isGroup]) {
- if (index == NSOutlineViewDropOnItemIndex) {
- index = 0;
+ if (childIndex == NSOutlineViewDropOnItemIndex) {
+ childIndex = 0;
}
}
else {
- if (index == NSOutlineViewDropOnItemIndex) {
- index = 0;
+ if (childIndex == NSOutlineViewDropOnItemIndex) {
+ childIndex = 0;
}
}
@@ -251,13 +251,13 @@ static NSString *SPDatabaseImage = @"database-small";
{
// Remove the node from its old location
NSInteger oldIndex = [childNodeArray indexOfObject:treeNode];
- NSInteger newIndex = index;
+ NSInteger newIndex = childIndex;
if (oldIndex != NSNotFound) {
[childNodeArray removeObjectAtIndex:oldIndex];
- if (index > oldIndex) {
+ if (childIndex > oldIndex) {
newIndex--;
}
}
diff --git a/Source/SPDatabaseStructure.m b/Source/SPDatabaseStructure.m
index 79e2cc5d..095a51c1 100644
--- a/Source/SPDatabaseStructure.m
+++ b/Source/SPDatabaseStructure.m
@@ -650,4 +650,4 @@
return YES;
}
-@end \ No newline at end of file
+@end