Skip to content

Commit 540198e

Browse files
author
Thayer J Andrews
committed
CCCacheTest - Get it building with Apportable
The compiler does not like "NSValue *_A;" but it's cool with *A and *_valueA. Use the latter and not the former since I just can't name a variable "A". Though is "valueFoo" really that much more descriptive than plain old "foo"? It's a question for the ages...
1 parent ee51c21 commit 540198e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

cocos2d-ui-tests/tests/CCCacheTest.m

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ @implementation CCCacheTest
5353
{
5454
DemoCache *_cache;
5555
int _testStep;
56-
NSValue *_A;
57-
NSValue *_B;
56+
NSValue *_valueA;
57+
NSValue *_valueB;
5858
}
5959

6060
- (NSArray*) testConstructors
@@ -94,12 +94,12 @@ - (void)stepClicked:(id)sender
9494

9595
case 1:
9696
CCLOG(@"-- objectA in use");
97-
_A = [_cache objectForKey:@"objectA"];
97+
_valueA = [_cache objectForKey:@"objectA"];
9898
break;
9999

100100
case 2:
101101
CCLOG(@"-- objectB in use");
102-
_B = [_cache objectForKey:@"objectB"];
102+
_valueB = [_cache objectForKey:@"objectB"];
103103
break;
104104

105105
case 3:
@@ -109,7 +109,7 @@ - (void)stepClicked:(id)sender
109109

110110
case 4:
111111
CCLOG(@"-- objectA not in use anymore");
112-
_A = nil;
112+
_valueA = nil;
113113
break;
114114

115115
case 5:
@@ -119,13 +119,13 @@ - (void)stepClicked:(id)sender
119119

120120
case 6:
121121
CCLOG(@"-- New objectA should be created");
122-
_A = [_cache objectForKey:@"objectA"];
122+
_valueA = [_cache objectForKey:@"objectA"];
123123
break;
124124

125125
case 7:
126126
CCLOG(@"-- No new objectB should be created");
127127
[_cache flush];
128-
_B = [_cache objectForKey:@"objectB"];
128+
_valueB = [_cache objectForKey:@"objectB"];
129129
break;
130130

131131
default:

0 commit comments

Comments
 (0)