mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Update stringForObjectValue:
This commit is contained in:
parent
9e96cbd1c8
commit
ba3d60c5ab
2 changed files with 13 additions and 6 deletions
|
@ -107,11 +107,12 @@ GS_NSByteCountFormatter_IVARS;
|
|||
- (BOOL) zeroPadsFractionDigits;
|
||||
- (void) setZeroPadsFractionDigits: (BOOL)flag;
|
||||
|
||||
/* Beta methods... not yet implemented.
|
||||
- (NSString *)stringForObjectValue: (id)obj;
|
||||
- (NSString *)stringFromMeasurement
|
||||
*/
|
||||
|
||||
- (NSString *) stringForObjectValue: (id)obj;
|
||||
|
||||
/* Beta methods...
|
||||
- (NSString *) stringFromMeasurement: (NSMeasurement *)measurement;
|
||||
End beta methods. */
|
||||
|
||||
- (NSString *)stringFromByteCount: (long long)byteCount;
|
||||
|
||||
+ (NSString *)stringFromByteCount: (long long)byteCount
|
||||
|
|
|
@ -69,7 +69,13 @@ GS_PRIVATE_INTERNAL(NSByteCountFormatter)
|
|||
|
||||
- (NSString *)stringForObjectValue: (id)obj
|
||||
{
|
||||
long long byteCount = [obj longLongValue];
|
||||
long long byteCount = 0;
|
||||
|
||||
if([obj respondsToSelector: @selector(longLongValue)])
|
||||
{
|
||||
byteCount = [obj longLongValue];
|
||||
}
|
||||
|
||||
return [self stringFromByteCount: byteCount];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue