Removed convenience initializer in MPPClassificationResult
This commit is contained in:
parent
d804506799
commit
8570136f80
|
@ -89,18 +89,6 @@ NS_SWIFT_NAME(ClassificationResult)
|
|||
**/
|
||||
@property(nonatomic, readonly) NSInteger timestampMs;
|
||||
|
||||
/**
|
||||
* Initializes a new `MPPClassificationResult` with the given array of classifications. This method
|
||||
* must be used when no time stamp needs to be specified. It sets the property `timestampMs` to -1.
|
||||
*
|
||||
* @param classifications An Aaray of `MPPClassifications` objects containing classifier
|
||||
* predictions per classifier head.
|
||||
*
|
||||
* @return An instance of MPPClassificationResult initialized with the given array of
|
||||
* classifications.
|
||||
**/
|
||||
- (instancetype)initWithClassifications:(NSArray<MPPClassifications *> *)classifications;
|
||||
|
||||
/**
|
||||
* Initializes a new `MPPClassificationResult` with the given array of classifications and time
|
||||
* stamp (in milliseconds).
|
||||
|
|
|
@ -48,10 +48,4 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (instancetype)initWithClassifications:(NSArray<MPPClassifications *> *)classifications {
|
||||
return [self initWithClassifications:classifications timestampMs:-1];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -54,15 +54,13 @@ using ClassificationResultProto =
|
|||
}
|
||||
|
||||
MPPClassificationResult *classificationResult;
|
||||
NSInteger timeStampMs;
|
||||
|
||||
if (classificationResultProto.has_timestamp_ms()) {
|
||||
classificationResult = [[MPPClassificationResult alloc] initWithClassifications:classifications timestampMs:(NSInteger)classificationResultProto.timestamp_ms()];
|
||||
timeStampMs = (NSInteger)classificationResultProto.timestamp_ms();
|
||||
}
|
||||
else {
|
||||
classificationResult = [[MPPClassificationResult alloc] initWithClassifications:classifications];
|
||||
}
|
||||
|
||||
return classificationResult;
|
||||
|
||||
return [[MPPClassificationResult alloc] initWithClassifications:classifications timestampMs:timeStampMs];;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in New Issue
Block a user