Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changing activity status counter to signed integer, to ensure MAX(0,_…

…activityCount) is enforced as expected
  • Loading branch information...
commit 6d213e0bde9df1205ed507fe9a782fc0e19f48ca 1 parent 390c51a
@mattt mattt authored
View
2  AFNetworking/AFNetworkActivityIndicatorManager.h
@@ -24,7 +24,7 @@
@interface AFNetworkActivityIndicatorManager : NSObject {
@private
- NSUInteger _activityCount;
+ NSInteger _activityCount;
}
+ (AFNetworkActivityIndicatorManager *)sharedManager;
View
4 AFNetworking/AFNetworkActivityIndicatorManager.m
@@ -23,7 +23,7 @@
#import "AFNetworkActivityIndicatorManager.h"
@interface AFNetworkActivityIndicatorManager ()
-@property (readwrite, nonatomic, assign) NSUInteger activityCount;
+@property (readwrite, nonatomic, assign) NSInteger activityCount;
@end
@implementation AFNetworkActivityIndicatorManager
@@ -38,7 +38,7 @@ + (AFNetworkActivityIndicatorManager *)sharedManager {
return _sharedManager;
}
-- (void)setActivityCount:(NSUInteger)activityCount {
+- (void)setActivityCount:(NSInteger)activityCount {
[self willChangeValueForKey:@"activityCount"];
_activityCount = MAX(activityCount, 0);
[self didChangeValueForKey:@"activityCount"];
Please sign in to comment.
Something went wrong with that request. Please try again.