aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/system_preferences_mac.mm
diff options
context:
space:
mode:
authorGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-06-06 12:10:45 +0000
committerGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-06-06 12:10:45 +0000
commit1313086ef4d901176e569d1f4b6362250ac02cd7 (patch)
tree8b3b55db16e783e6237b2b9b53125a59a2bfa101 /gm/system_preferences_mac.mm
parent83ecdc3ac69c9208493c4c3fc8ea9f84b1350535 (diff)
fix warnings on Mac in gm
Fix these class of warnings: - unused functions - unused locals - sign mismatch - missing function prototypes - missing newline at end of file - 64 to 32 bit truncation The changes prefer to link in dead code in the debug build with 'if (false)' than to comment it out, but trivial cases are commented out or sometimes deleted if it appears to be a copy/paste error. Review URL: https://codereview.appspot.com/6305046 git-svn-id: http://skia.googlecode.com/svn/trunk@4185 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm/system_preferences_mac.mm')
-rw-r--r--gm/system_preferences_mac.mm13
1 files changed, 9 insertions, 4 deletions
diff --git a/gm/system_preferences_mac.mm b/gm/system_preferences_mac.mm
index 2c772a156c..1c43b749b1 100644
--- a/gm/system_preferences_mac.mm
+++ b/gm/system_preferences_mac.mm
@@ -7,16 +7,21 @@
#import <Cocoa/Cocoa.h>
+// FIXME: should be in a header
+void setSystemPreferences();
+
void setSystemPreferences() {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
// Set LCD font smoothing level for this application (does not affect other
// applications). Based on resetDefaultsToConsistentValues() in
// http://trac.webkit.org/browser/trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm
- static const int NoFontSmoothing = 0;
- static const int LightFontSmoothing = 1;
- static const int MediumFontSmoothing = 2;
- static const int StrongFontSmoothing = 3;
+ enum {
+ NoFontSmoothing = 0,
+ LightFontSmoothing = 1,
+ MediumFontSmoothing = 2,
+ StrongFontSmoothing = 3,
+ };
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setInteger:MediumFontSmoothing forKey:@"AppleFontSmoothing"];