diff options
author | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2011-11-18 13:00:48 +0000 |
---|---|---|
committer | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2011-11-18 13:00:48 +0000 |
commit | 294cff974cbc49441321f1220e31f199a16f07e7 (patch) | |
tree | 8e76a21c36e3bc81cd8d7caf637270cafc3ae8c4 /iPhone | |
parent | 900bf76ce6eb94456008b78e60254b03794dc6be (diff) |
[Author: qsr]
Follow dmaclach review -> style changes.
R=dmaclach
APPROVED=dmaclach
Diffstat (limited to 'iPhone')
-rw-r--r-- | iPhone/GTMUILocalizer.m | 5 | ||||
-rw-r--r-- | iPhone/GTMUILocalizerTest.m | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/iPhone/GTMUILocalizer.m b/iPhone/GTMUILocalizer.m index c6b7fca..7923d05 100644 --- a/iPhone/GTMUILocalizer.m +++ b/iPhone/GTMUILocalizer.m @@ -222,13 +222,14 @@ UIControlStateHighlighted, UIControlStateDisabled, UIControlStateSelected }; - for (size_t idx = 0; idx < (sizeof(allStates)/sizeof(allStates[0])) ; ++idx) { + for (size_t idx = 0; idx < (sizeof(allStates)/sizeof(allStates[0])); ++idx) { UIControlState state = allStates[idx]; NSString *value = [button titleForState:state]; if (value) { NSString* localizedValue = [self localizedStringForString:value]; - if (localizedValue) + if (localizedValue) { [button setTitle:localizedValue forState:state]; + } } } } diff --git a/iPhone/GTMUILocalizerTest.m b/iPhone/GTMUILocalizerTest.m index dfe1f32..a53c249 100644 --- a/iPhone/GTMUILocalizerTest.m +++ b/iPhone/GTMUILocalizerTest.m @@ -64,7 +64,7 @@ UIControlStateHighlighted, UIControlStateDisabled, UIControlStateSelected }; - for (size_t idx = 0; idx < (sizeof(allStates)/sizeof(allStates[0])) ; ++idx) { + for (size_t idx = 0; idx < (sizeof(allStates)/sizeof(allStates[0])); ++idx) { UIControlState state = allStates[idx]; STAssertEqualStrings(value, [[controller button] titleForState:state], nil); } @@ -82,7 +82,7 @@ // Accessibility label seems to not be working at all. They always are nil. // Even when setting those explicitly there, the getter always returns nil. -// This might cause because the gobal accessibility switch is not on during the +// This might be because the gobal accessibility switch is not on during the // tests. #if 0 STAssertEqualStrings(value, [[controller view] accessibilityLabel], @@ -98,7 +98,7 @@ - (void)testLocalization { GTMUILocalizerTestViewController *controller = - [[GTMUILocalizerTestViewController alloc] init]; + [[[GTMUILocalizerTestViewController alloc] init] autorelease]; // Load the view. [controller view]; |