aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-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