aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-09-29 12:39:59 +0000
committerstuconnolly <stuart02@gmail.com>2010-09-29 12:39:59 +0000
commit0ff441a257f77492b8cabd4270e044e3707b5cb0 (patch)
treec9855c4008ed8bd2d7db6792e7dda257aafc14c8
parent27b56e28dbf27cf0a6e5e3c933564b3b77a1d1d7 (diff)
downloadsequelpro-0ff441a257f77492b8cabd4270e044e3707b5cb0.tar.gz
sequelpro-0ff441a257f77492b8cabd4270e044e3707b5cb0.tar.bz2
sequelpro-0ff441a257f77492b8cabd4270e044e3707b5cb0.zip
Remove unused macros as well as macros that were only used in a single place from the precompiled header.
-rw-r--r--Source/SPNarrowDownCompletion.m10
-rw-r--r--Source/Sequel-Pro.pch16
2 files changed, 6 insertions, 20 deletions
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 <Cocoa/Cocoa.h>
#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