remove unused FunctionalUtil code

pull/1/head
Michael Kirk 7 years ago
parent a2852ee930
commit 503cb046e4

@ -1,5 +1,5 @@
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
@interface NSArray (FunctionalUtil)
@ -19,15 +19,6 @@
/// Returns an array of all the results of passing items from this array through the given projection function.
- (NSArray *)filter:(int (^)(id item))predicate;
/// Returns the sum of the doubles in this array of doubles.
- (double)sumDouble;
/// Returns the sum of the unsigned integers in this array of unsigned integers.
- (NSUInteger)sumNSUInteger;
/// Returns the sum of the integers in this array of integers.
- (NSInteger)sumNSInteger;
- (NSDictionary *)keyedBy:(id (^)(id))keySelector;
- (NSDictionary *)groupBy:(id (^)(id value))keySelector;

@ -1,5 +1,5 @@
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import "FunctionalUtil.h"
@ -52,27 +52,7 @@
}
return r;
}
- (double)sumDouble {
double s = 0.0;
for (NSNumber *e in self) {
s += [e doubleValue];
}
return s;
}
- (NSUInteger)sumNSUInteger {
NSUInteger s = 0;
for (NSNumber *e in self) {
s += [e unsignedIntegerValue];
}
return s;
}
- (NSInteger)sumNSInteger {
NSInteger s = 0;
for (NSNumber *e in self) {
s += [e integerValue];
}
return s;
}
- (NSDictionary *)keyedBy:(id (^)(id value))keySelector {
OWSAssertDebug(keySelector != nil);

@ -1,5 +1,5 @@
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
@interface NSArray (FunctionalUtil)
@ -19,15 +19,6 @@
/// Returns an array of all the results of passing items from this array through the given projection function.
- (NSArray *)filter:(int (^)(id item))predicate;
/// Returns the sum of the doubles in this array of doubles.
- (double)sumDouble;
/// Returns the sum of the unsigned integers in this array of unsigned integers.
- (NSUInteger)sumNSUInteger;
/// Returns the sum of the integers in this array of integers.
- (NSInteger)sumNSInteger;
- (NSDictionary *)keyedBy:(id (^)(id))keySelector;
- (NSDictionary *)groupBy:(id (^)(id value))keySelector;

@ -75,27 +75,7 @@
}
return r;
}
- (double)sumDouble {
double s = 0.0;
for (NSNumber *e in self) {
s += [e doubleValue];
}
return s;
}
- (NSUInteger)sumNSUInteger {
NSUInteger s = 0;
for (NSNumber *e in self) {
s += [e unsignedIntegerValue];
}
return s;
}
- (NSInteger)sumNSInteger {
NSInteger s = 0;
for (NSNumber *e in self) {
s += [e integerValue];
}
return s;
}
- (NSDictionary *)keyedBy:(id (^)(id value))keySelector {
tskit_require(keySelector != nil);

Loading…
Cancel
Save