Add stringForObjectValue: to formatters

This commit is contained in:
Gregory John Casamento 2019-09-17 14:56:39 -04:00
parent 981fecc39b
commit a58a58373d
3 changed files with 39 additions and 4 deletions

View file

@ -67,6 +67,13 @@ GS_PRIVATE_INTERNAL(NSByteCountFormatter)
return [formatter stringFromByteCount: byteCount];
}
- (NSString *)stringForObjectValue: (id)obj
{
long long byteCount = [obj longLongValue];
return [[self class] stringFromByteCount: byteCount
countStyle: NSByteCountFormatterUseDefault];
}
- (NSByteCountFormatterUnits) _adaptiveSettings: (double)byteCount
{
NSByteCountFormatterUnits units = NSByteCountFormatterUseDefault;