aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPNarrowDownCompletion.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPNarrowDownCompletion.m')
-rw-r--r--Source/SPNarrowDownCompletion.m10
1 files changed, 6 insertions, 4 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;
}