1
This commit is contained in:
43
Pods/LookinServer/Src/Main/Shared/LookinWeakContainer.m
generated
Normal file
43
Pods/LookinServer/Src/Main/Shared/LookinWeakContainer.m
generated
Normal file
@@ -0,0 +1,43 @@
|
||||
#ifdef SHOULD_COMPILE_LOOKIN_SERVER
|
||||
|
||||
//
|
||||
// LookinWeakContainer.m
|
||||
// Lookin
|
||||
//
|
||||
// Created by Li Kai on 2019/8/14.
|
||||
// https://lookin.work
|
||||
//
|
||||
|
||||
|
||||
|
||||
#import "LookinWeakContainer.h"
|
||||
|
||||
@implementation LookinWeakContainer
|
||||
|
||||
+ (instancetype)containerWithObject:(id)object {
|
||||
LookinWeakContainer *container = [LookinWeakContainer new];
|
||||
container.object = object;
|
||||
return container;
|
||||
}
|
||||
|
||||
- (NSUInteger)hash {
|
||||
return [self.object hash];
|
||||
}
|
||||
|
||||
- (BOOL)isEqual:(id)object {
|
||||
if (self == object) {
|
||||
return YES;
|
||||
}
|
||||
if (![object isKindOfClass:[LookinWeakContainer class]]) {
|
||||
return NO;
|
||||
}
|
||||
LookinWeakContainer *comparedObj = object;
|
||||
if ([self.object isEqual:comparedObj.object]) {
|
||||
return YES;
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#endif /* SHOULD_COMPILE_LOOKIN_SERVER */
|
||||
Reference in New Issue
Block a user