From 294cff974cbc49441321f1220e31f199a16f07e7 Mon Sep 17 00:00:00 2001 From: "gtm.daemon" Date: Fri, 18 Nov 2011 13:00:48 +0000 Subject: [Author: qsr] Follow dmaclach review -> style changes. R=dmaclach APPROVED=dmaclach --- iPhone/GTMUILocalizer.m | 5 +++-- iPhone/GTMUILocalizerTest.m | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'iPhone') 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]; -- cgit v1.2.3