mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
use double type for average
This commit is contained in:
parent
fcd464f118
commit
c0d6599def
2 changed files with 4 additions and 3 deletions
|
@ -186,7 +186,7 @@
|
|||
_costLimit = lim;
|
||||
}
|
||||
|
||||
- (NSUInteger)totalCostLimit
|
||||
- (NSUInteger) totalCostLimit
|
||||
{
|
||||
return _costLimit;
|
||||
}
|
||||
|
@ -213,7 +213,7 @@
|
|||
{
|
||||
NSMutableArray *evictedKeys = nil;
|
||||
// Round up slightly.
|
||||
NSUInteger averageAccesses = (_totalAccesses / count * 0.2) + 1;
|
||||
NSUInteger averageAccesses = ((_totalAccesses / (double)count) * 0.2) + 1;
|
||||
NSEnumerator *e = [_accesses objectEnumerator];
|
||||
_GSCachedObject *obj;
|
||||
|
||||
|
@ -275,7 +275,7 @@
|
|||
@end
|
||||
|
||||
@implementation _GSCachedObject
|
||||
- (void)dealloc
|
||||
- (void) dealloc
|
||||
{
|
||||
[object release];
|
||||
[key release];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue