From 0ff441a257f77492b8cabd4270e044e3707b5cb0 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Wed, 29 Sep 2010 12:39:59 +0000 Subject: Remove unused macros as well as macros that were only used in a single place from the precompiled header. --- Source/SPNarrowDownCompletion.m | 10 ++++++---- Source/Sequel-Pro.pch | 16 ---------------- 2 files changed, 6 insertions(+), 20 deletions(-) (limited to 'Source') diff --git a/Source/SPNarrowDownCompletion.m b/Source/SPNarrowDownCompletion.m index 487b8284..05642c87 100644 --- a/Source/SPNarrowDownCompletion.m +++ b/Source/SPNarrowDownCompletion.m @@ -79,7 +79,7 @@ keyCode = [[anEvent characters] characterAtIndex:0]; - for(size_t i = 0; i < sizeofA(key_movements); ++i) + for(size_t i = 0; i < (sizeof(key_movements) / sizeof(key_movements[0])); ++i) { if(keyCode == key_movements[i].key) { @@ -740,12 +740,14 @@ - (NSRect)rectOfMainScreen { NSRect mainScreen = [[NSScreen mainScreen] frame]; - NSScreen* candidate; - enumerate([NSScreen screens], candidate) + + for (NSScreen *candidate in [NSScreen screens]) { - if(NSMinX([candidate frame]) == 0.0f && NSMinY([candidate frame]) == 0.0f) + if (NSMinX([candidate frame]) == 0.0f && NSMinY([candidate frame]) == 0.0f) { mainScreen = [candidate frame]; + } } + return mainScreen; } diff --git a/Source/Sequel-Pro.pch b/Source/Sequel-Pro.pch index 07fdf502..f3821249 100644 --- a/Source/Sequel-Pro.pch +++ b/Source/Sequel-Pro.pch @@ -5,19 +5,3 @@ #ifdef __OBJC__ #import #endif - -#ifdef DEBUG - #define DLog(...) NSLog(__VA_ARGS__) -#else - #define DLog(...) -#endif - -#define ALog(...) NSLog(__VA_ARGS__) - -#ifndef enumerate -#define enumerate(container,var) for(NSEnumerator* _enumerator = [container objectEnumerator]; var = [_enumerator nextObject]; ) -#endif - -#ifndef sizeofA -#define sizeofA(a) (sizeof(a)/sizeof(a[0])) -#endif -- cgit v1.2.3