Skip to content

Commit

Permalink
rename standardValueWithTypeCode -> mj_standardValueWithTypeCode (#776)
Browse files Browse the repository at this point in the history
  • Loading branch information
Neeeo authored Jun 22, 2020
1 parent f069f92 commit b50e9b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MJExtension/NSObject+MJKeyValue.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

@implementation NSDecimalNumber(MJKeyValue)

- (id)standardValueWithTypeCode:(NSString *)typeCode {
- (id)mj_standardValueWithTypeCode:(NSString *)typeCode {
// 由于这里涉及到编译器问题, 暂时保留 Long, 实际上在 64 位系统上, 这 2 个精度范围相同,
// 32 位略有不同, 其余都可使用 Double 进行强转不丢失精度
if ([typeCode isEqualToString:MJPropertyTypeLongLong]) {
Expand Down Expand Up @@ -187,7 +187,7 @@ - (instancetype)mj_setKeyValues:(id)keyValues context:(NSManagedObjectContext *)
if (decimalValue == NSDecimalNumber.notANumber) {
value = @(0);
}else if (propertyClass != [NSDecimalNumber class]) {
value = [decimalValue standardValueWithTypeCode:type.code];
value = [decimalValue mj_standardValueWithTypeCode:type.code];
} else {
value = decimalValue;
}
Expand Down

0 comments on commit b50e9b5

Please sign in to comment.