Skip to content

Commit 89cc197

Browse files
committed
Cleaning up inconsistent #if DEBUG usage.
1 parent 1bd2e11 commit 89cc197

File tree

8 files changed

+10
-13
lines changed

8 files changed

+10
-13
lines changed

cocos2d-ui/CCBReader/CCAnimationManager.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ -(void) onEnter {
8585

8686
- (void)addNode:(CCNode*)node andSequences:(NSDictionary*)seq
8787
{
88-
#ifdef DEBUG
88+
#if DEBUG
8989
//Sanity check sequences;
9090

9191
for (NSMutableDictionary* seqNodeProps in seq.allValues) {

cocos2d/CCDirector.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ -(void) calculateDeltaTime
265265
_dt = MAX(0,_dt);
266266
}
267267

268-
#ifdef DEBUG
268+
#if DEBUG
269269
// If we are debugging our code, prevent big delta time
270270
if( _dt > 0.2f )
271271
_dt = 1/60.0f;

cocos2d/CCNode+Debug.h

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

2626
#import "CCNode.h"
2727

28-
#ifdef DEBUG
28+
#if DEBUG
2929

3030
/** Debugging extensions of CCNode. They are available when the DEBUG macro is defined at compile time. */
3131
@interface CCNode (Debug)

cocos2d/CCNode+Debug.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#import "CCNode+Debug.h"
2727
#import "CCNode_Private.h"
2828

29-
#ifdef DEBUG
29+
#if DEBUG
3030

3131
@implementation CCNode (Debug)
3232

cocos2d/CCPhysicsBody.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ -(void)didRemoveFromPhysicsNode:(CCPhysicsNode *)physics
514514
//The following are properties which we track on the parent nodes in order to update the child nodes.
515515
NSString * kDependantProperties[2] = { @"position", @"rotation"};
516516

517-
#ifdef DEBUG
517+
#if DEBUG
518518
//The following are properties which cannot be animated. Changing their values after onEnter in unhandled.
519519
NSString * kRestrictedProperties[3] = { @"scale", @"scaleX", @"scaleY"};
520520
#endif
@@ -531,7 +531,7 @@ -(void)trackParentTransformations:(CCPhysicsNode *)physics
531531
[node addObserver:self forKeyPath:kDependantProperties[i] options:NSKeyValueObservingOptionNew context:nil];
532532
}
533533

534-
#ifdef DEBUG
534+
#if DEBUG
535535
for (int i = 0; i < sizeof(kRestrictedProperties)/sizeof(kRestrictedProperties[0]); i++)
536536
{
537537
[node addObserver:self forKeyPath:kRestrictedProperties[i] options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld context:nil];
@@ -552,7 +552,7 @@ -(void)removeParentTransformTracking:(CCPhysicsNode *)physics
552552
{
553553
[node removeObserver:self forKeyPath:kDependantProperties[i]];
554554
}
555-
#ifdef DEBUG
555+
#if DEBUG
556556
for (int i = 0; i < sizeof(kRestrictedProperties)/sizeof(kRestrictedProperties[0]); i++)
557557
{
558558
[node removeObserver:self forKeyPath:kRestrictedProperties[i]];
@@ -567,7 +567,7 @@ -(void)removeParentTransformTracking:(CCPhysicsNode *)physics
567567

568568
-(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
569569
{
570-
#ifdef DEBUG
570+
#if DEBUG
571571
for (int i = 0; i < sizeof(kRestrictedProperties)/sizeof(kRestrictedProperties[0]); i++)
572572
{
573573
if([kRestrictedProperties[i] isEqualToString:keyPath])

cocos2d/CCTexturePVR.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,8 +598,7 @@ - (id)initWithContentsOfFile:(NSString *)path
598598
return nil;
599599
}
600600

601-
#if defined(__CC_PLATFORM_IOS) && defined(DEBUG)
602-
601+
#if defined(__CC_PLATFORM_IOS) && DEBUG
603602
GLenum pixelFormat = _pixelFormatInfo->ccPixelFormat;
604603
CCConfiguration *conf = [CCConfiguration sharedConfiguration];
605604

cocos2d/Platforms/iOS/CCAppDelegate.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,8 @@ - (void) setupCocos2dWithOptions:(NSDictionary*)config
191191

192192
director.wantsFullScreenLayout = YES;
193193

194-
//#if DEBUG
195194
// Display FSP and SPF
196195
[director setDisplayStats:[config[CCSetupShowDebugStats] boolValue]];
197-
//#endif
198196

199197
// set FPS at 60
200198
NSTimeInterval animationInterval = [(config[CCSetupAnimationInterval] ?: @(1.0/60.0)) doubleValue];

cocos2d/Platforms/iOS/CCDirectorIOS.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ -(void) calculateDeltaTime
433433
if( _displayStats )
434434
gettimeofday( &_lastUpdate, NULL);
435435

436-
#ifdef DEBUG
436+
#if DEBUG
437437
// If we are debugging our code, prevent big delta time
438438
if( _dt > 0.2f )
439439
_dt = 1/60.0f;

0 commit comments

Comments
 (0)