diff options
author | stuconnolly <stuart02@gmail.com> | 2010-09-29 12:39:59 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2010-09-29 12:39:59 +0000 |
commit | 0ff441a257f77492b8cabd4270e044e3707b5cb0 (patch) | |
tree | c9855c4008ed8bd2d7db6792e7dda257aafc14c8 /Source/SPNarrowDownCompletion.m | |
parent | 27b56e28dbf27cf0a6e5e3c933564b3b77a1d1d7 (diff) | |
download | sequelpro-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.
Diffstat (limited to 'Source/SPNarrowDownCompletion.m')
-rw-r--r-- | Source/SPNarrowDownCompletion.m | 10 |
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; } |