Skip to content

Commit f06c14e

Browse files
author
Thayer J Andrews
committed
CCEffects - Explicitly set the strong and assign property attributes
Bill and Scott have pointed out that the absence of these attributes cause warnings in non-ARC code.
1 parent 163a905 commit f06c14e

20 files changed

+51
-51
lines changed

cocos2d/CCEffectBloom.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@
2525
* This value is in the range [0..1]. Lower values mean that more pixels will
2626
* contribute to the blurry bloom image.
2727
*/
28-
@property (nonatomic) float luminanceThreshold;
28+
@property (nonatomic, assign) float luminanceThreshold;
2929

3030
/** The intensity of the blurred out bloom image when added to the original
3131
* unmodified image. This value is in the range [0..1]. 0 results in no bloom
3232
* while higher values result in more bloom.
3333
*/
34-
@property (nonatomic) float intensity;
34+
@property (nonatomic, assign) float intensity;
3535

3636
/** The size of the blur of the bloom image. This value is in the range [0..6].
3737
*/
38-
@property (nonatomic) NSUInteger blurRadius;
38+
@property (nonatomic, assign) NSUInteger blurRadius;
3939

4040

4141
/// -----------------------------------------------------------------------

cocos2d/CCEffectBlur.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
/** The size of the blur. This value is in the range [0..6].
2424
*/
25-
@property (nonatomic) NSUInteger blurRadius;
25+
@property (nonatomic, assign) NSUInteger blurRadius;
2626

2727

2828
/// -----------------------------------------------------------------------

cocos2d/CCEffectBrightness.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
* of -1 reduces the affected color to 0 (black), 0 results in no change, 1
2727
* increases the affected color to 1 (white).
2828
*/
29-
@property (nonatomic) float brightness;
29+
@property (nonatomic, assign) float brightness;
3030

3131

3232
/// -----------------------------------------------------------------------

cocos2d/CCEffectBrightness.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
@interface CCEffectBrightness ()
1717

18-
@property (nonatomic) NSNumber *conditionedBrightness;
18+
@property (nonatomic, strong) NSNumber *conditionedBrightness;
1919

2020
@end
2121

cocos2d/CCEffectContrast.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
* an adjustment value of -1 scales the affected color by 0.25, 0 results in no
2727
* change, and 1 scales the affected color by 4.
2828
*/
29-
@property (nonatomic) float contrast;
29+
@property (nonatomic, assign) float contrast;
3030

3131

3232
/// -----------------------------------------------------------------------

cocos2d/CCEffectContrast.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
@interface CCEffectContrast ()
1818

19-
@property (nonatomic) NSNumber *conditionedContrast;
19+
@property (nonatomic, strong) NSNumber *conditionedContrast;
2020

2121
@end
2222

cocos2d/CCEffectGlass.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,26 @@
2626
* resulting in maximum minification of the refracted image, 0 resulting in no
2727
* refraction, and 1 resulting in maximum magnification of the refracted image.
2828
*/
29-
@property (nonatomic) float refraction;
29+
@property (nonatomic, assign) float refraction;
3030

3131
/** The overall shininess of the attached sprite. This value is in the range [0..1] and it controls
3232
* how much of the reflected environment contributes to the final color of the affected pixels.
3333
*/
34-
@property (nonatomic) float shininess;
34+
@property (nonatomic, assign) float shininess;
3535

3636
/** The bias term in the fresnel reflectance equation:
3737
* reflectance = max(0.0, fresnelBias + (1 - fresnelBias) * pow((1 - nDotV), fresnelPower))
3838
* This value is in the range [0..1] and it controls the constant (view angle independent) contribution
3939
* to the reflectance equation.
4040
*/
41-
@property (nonatomic) float fresnelBias;
41+
@property (nonatomic, assign) float fresnelBias;
4242

4343
/** The power term in the fresnel reflectance equation:
4444
* reflectance = max(0.0, fresnelBias + (1 - fresnelBias) * pow((1 - nDotV), fresnelPower))
4545
* This value is in the range [0..inf] and it controls the view angle dependent contribution
4646
* to the reflectance equation.
4747
*/
48-
@property (nonatomic) float fresnelPower;
48+
@property (nonatomic, assign) float fresnelPower;
4949

5050
/** The environment that will be refracted by the affected node. Typically this is a
5151
* sprite that serves as the background for the affected node so it appears that the viewer

cocos2d/CCEffectGlass.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424

2525
@interface CCEffectGlass ()
2626

27-
@property (nonatomic) float conditionedRefraction;
28-
@property (nonatomic) float conditionedShininess;
29-
@property (nonatomic) float conditionedFresnelBias;
30-
@property (nonatomic) float conditionedFresnelPower;
27+
@property (nonatomic, assign) float conditionedRefraction;
28+
@property (nonatomic, assign) float conditionedShininess;
29+
@property (nonatomic, assign) float conditionedFresnelBias;
30+
@property (nonatomic, assign) float conditionedFresnelPower;
3131

3232
@end
3333

cocos2d/CCEffectHue.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
* hue adjustment of 120 you will get a green sprite. Instead if you apply a hue adjustment
2727
* of -120 you will get a blue sprite.
2828
*/
29-
@property (nonatomic) float hue;
29+
@property (nonatomic, assign) float hue;
3030

3131

3232
/// -----------------------------------------------------------------------

cocos2d/CCEffectHue.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@
5757

5858
@interface CCEffectHue ()
5959
#if CCEFFECTHUE_USES_COLOR_MATRIX
60-
@property (nonatomic) NSValue *hueRotationMtx;
60+
@property (nonatomic, strong) NSValue *hueRotationMtx;
6161
#else
62-
@property (nonatomic) NSNumber *conditionedHue;
62+
@property (nonatomic, strong) NSNumber *conditionedHue;
6363
#endif
6464
@end
6565

0 commit comments

Comments
 (0)