mirror of
https://github.com/gnustep/libs-gdl2.git
synced 2025-04-23 13:10:48 +00:00
Use NSUInteger and remove methods declared in super class.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@30198 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6b8476b76b
commit
ab3613f0c2
5 changed files with 36 additions and 69 deletions
|
@ -1,3 +1,11 @@
|
|||
2010-04-19 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* EOControl/EOMutableKnownKeyDictionary.h,
|
||||
* EOControl/EOMutableKnownKeyDictionary.m,
|
||||
* EOControl/EOCheapArray.h,
|
||||
* EOControl/EOCheapArray.m: Use NSUInteger and remove methods
|
||||
declared in super class.
|
||||
|
||||
2010-04-19 David Ayers <ayers@fsfe.org>
|
||||
|
||||
* EOAccess/EODatabaseContext.m
|
||||
|
|
|
@ -34,60 +34,28 @@
|
|||
#include <Foundation/Foundation.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@interface EOCheapCopyArray : NSArray
|
||||
{
|
||||
unsigned int _count;
|
||||
NSUInteger _count;
|
||||
id *_contents_array;
|
||||
unsigned int _refcount;
|
||||
}
|
||||
|
||||
- (id)initWithArray: (NSArray *)array;
|
||||
- (id)initWithObjects: (id *)objects
|
||||
count: (NSUInteger)count;
|
||||
- (void)release;
|
||||
- (unsigned int)retainCount;
|
||||
- (id)retain;
|
||||
- (id)objectAtIndex: (unsigned int)index;
|
||||
//- (id)copyWithZone: (NSZone *)zone;
|
||||
- (unsigned int)count;
|
||||
//- (BOOL)containsObject: (id)obejct;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface EOCheapCopyMutableArray : NSMutableArray
|
||||
{
|
||||
unsigned int _count;
|
||||
NSUInteger _count;
|
||||
id *_contents_array;
|
||||
unsigned int _capacity;
|
||||
NSUInteger _capacity;
|
||||
unsigned int _grow_factor;
|
||||
id _immutableCopy;
|
||||
}
|
||||
|
||||
- (id)initWithCapacity: (NSUInteger)capacity;
|
||||
- (id)initWithObjects: (id *)objects
|
||||
count: (NSUInteger)count;
|
||||
- (id)initWithArray: (NSArray *)array;
|
||||
- (void)dealloc;
|
||||
- (NSArray *)shallowCopy;
|
||||
- (void)_setCopy: (id)param0;
|
||||
- (void)_mutate;
|
||||
- (unsigned int)count;
|
||||
- (id)objectAtIndex: (unsigned int)index;
|
||||
- (void)addObject: (id)object;
|
||||
- (void)insertObject: (id)object
|
||||
atIndex: (unsigned int)index;
|
||||
- (void)removeLastObject;
|
||||
- (void)removeObjectAtIndex: (unsigned int)index;
|
||||
- (void)replaceObjectAtIndex: (unsigned int)index
|
||||
withObject: (id)object;
|
||||
//- (BOOL)containsObject: (id)object;
|
||||
//- (unsigned int)indexOfObjectIdenticalTo: (id)object;
|
||||
//- (void)removeAllObjects;
|
||||
- (void)exchangeObjectAtIndex: (unsigned int)index1
|
||||
withObjectAtIndex: (unsigned int)index2;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ RCS_ID("$Id$")
|
|||
|
||||
if (count > 0)
|
||||
{
|
||||
unsigned i;
|
||||
NSUInteger i;
|
||||
|
||||
_contents_array = NSZoneMalloc([self zone], sizeof(id) * count);
|
||||
|
||||
|
@ -127,7 +127,7 @@ RCS_ID("$Id$")
|
|||
if (_contents_array)
|
||||
{
|
||||
#if !GS_WITH_GC
|
||||
unsigned i;
|
||||
NSUInteger i;
|
||||
|
||||
for (i = 0; i < _count; i++)
|
||||
{
|
||||
|
@ -184,7 +184,7 @@ RCS_ID("$Id$")
|
|||
return [super retain];
|
||||
}
|
||||
|
||||
- (id) objectAtIndex: (unsigned int)index
|
||||
- (id) objectAtIndex: (NSUInteger)index
|
||||
{
|
||||
if (index >= _count)
|
||||
{
|
||||
|
@ -196,7 +196,7 @@ RCS_ID("$Id$")
|
|||
}
|
||||
|
||||
//- (id) copyWithZone: (NSZone*)zone;
|
||||
- (unsigned int) count
|
||||
- (NSUInteger) count
|
||||
{
|
||||
return _count;
|
||||
}
|
||||
|
@ -264,7 +264,7 @@ RCS_ID("$Id$")
|
|||
if (_contents_array)
|
||||
{
|
||||
#if !GS_WITH_GC
|
||||
unsigned i;
|
||||
NSUInteger i;
|
||||
for (i = 0; i < _count; i++)
|
||||
{
|
||||
[_contents_array[i] release];
|
||||
|
@ -318,12 +318,12 @@ RCS_ID("$Id$")
|
|||
DESTROY(_immutableCopy);
|
||||
}
|
||||
|
||||
- (unsigned int) count
|
||||
- (NSUInteger) count
|
||||
{
|
||||
return _count;
|
||||
}
|
||||
|
||||
- (id) objectAtIndex: (unsigned int)index
|
||||
- (id) objectAtIndex: (NSUInteger)index
|
||||
{
|
||||
if (index >= _count)
|
||||
{
|
||||
|
@ -372,9 +372,9 @@ RCS_ID("$Id$")
|
|||
}
|
||||
|
||||
- (void) insertObject: (id)object
|
||||
atIndex: (unsigned int)index
|
||||
atIndex: (NSUInteger)index
|
||||
{
|
||||
unsigned i;
|
||||
NSUInteger i;
|
||||
|
||||
if (!object)
|
||||
{
|
||||
|
@ -439,7 +439,7 @@ RCS_ID("$Id$")
|
|||
RELEASE(_contents_array[_count]);
|
||||
}
|
||||
|
||||
- (void) removeObjectAtIndex: (unsigned int)index
|
||||
- (void) removeObjectAtIndex: (NSUInteger)index
|
||||
{
|
||||
id obj;
|
||||
|
||||
|
@ -462,7 +462,7 @@ RCS_ID("$Id$")
|
|||
RELEASE(obj); /* Adjust array BEFORE releasing object. */
|
||||
}
|
||||
|
||||
- (void) replaceObjectAtIndex: (unsigned int)index
|
||||
- (void) replaceObjectAtIndex: (NSUInteger)index
|
||||
withObject: (id)object;
|
||||
{
|
||||
id obj;
|
||||
|
@ -490,8 +490,8 @@ RCS_ID("$Id$")
|
|||
//TODO implement it for speed ?? - (BOOL) containsObject:(id)object
|
||||
//TODO implement it for speed ?? - (unsigned int) indexOfObjectIdenticalTo:(id)object
|
||||
//TODO implement it for speed ?? - (void) removeAllObjects;
|
||||
- (void) exchangeObjectAtIndex: (unsigned int)index1
|
||||
withObjectAtIndex: (unsigned int)index2
|
||||
- (void) exchangeObjectAtIndex: (NSUInteger)index1
|
||||
withObjectAtIndex: (NSUInteger)index2
|
||||
{
|
||||
id obj = nil;
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
@interface EOMKKDInitializer : NSObject
|
||||
{
|
||||
unsigned int _count;
|
||||
NSUInteger _count;
|
||||
NSMapTable *_keyToIndex; //key to index
|
||||
NSString **_keys;
|
||||
}
|
||||
|
@ -58,13 +58,13 @@
|
|||
|
||||
- (id)initWithKeys: (NSArray *)keys;
|
||||
- (NSString *)description;
|
||||
- (unsigned int)count;
|
||||
- (NSUInteger)count;
|
||||
- (void)setObject: (id)object
|
||||
forIndex: (unsigned int)index
|
||||
forIndex: (NSUInteger)index
|
||||
dictionary: (NSMutableDictionary *)dictionary;
|
||||
- (id)objectForIndex: (unsigned int)index
|
||||
- (id)objectForIndex: (NSUInteger)index
|
||||
dictionary: (NSDictionary *)dictionary;
|
||||
- (unsigned int)indexForKey: (id)key;
|
||||
- (NSUInteger)indexForKey: (id)key;
|
||||
- (EOMKKDArrayMapping *)arrayMappingForKeys: (NSArray *)keys;
|
||||
- (EOMKKDSubsetMapping *)subsetMappingForSourceDictionaryInitializer: (EOMKKDInitializer *)init
|
||||
sourceKeys: (NSArray *)sourceKeys
|
||||
|
@ -152,17 +152,8 @@
|
|||
- (id)initWithInitializer: (EOMKKDInitializer *)initializer;
|
||||
- (id)initWithInitializer: (EOMKKDInitializer *)initializer
|
||||
objects: (id *)objects;
|
||||
- (id)initWithObjects: (id *)objects
|
||||
forKeys: (id *)keys
|
||||
count: (NSUInteger)count;
|
||||
- (unsigned int)count;
|
||||
- (id)objectForKey: (id)key;
|
||||
- (void)setObject: (id)object
|
||||
forKey: (id)key;
|
||||
- (void)removeObjectForKey: (id)key;
|
||||
- (BOOL)containsObjectsNotIdenticalTo: (id)object;
|
||||
- (void)addEntriesFromDictionary: (NSDictionary *)dictionary;
|
||||
- (NSEnumerator *)keyEnumerator;
|
||||
- (EOMKKDInitializer *)eoMKKDInitializer;
|
||||
- (NSMutableDictionary *)extraData;
|
||||
- (BOOL)hasKey: (id)key;
|
||||
|
|
|
@ -120,7 +120,7 @@ RCS_ID("$Id$")
|
|||
EOFLOGObjectLevelArgs(@"EOMKKD", @"key=%@ RETAINCOUNT=%d",
|
||||
key, [key retainCount]);
|
||||
|
||||
oldValue = NSMapInsertIfAbsent(_keyToIndex,key, (const void*)(i + 1)); //+1 because 0 = no object
|
||||
oldValue = NSMapInsertIfAbsent(_keyToIndex,key, (const void*)(uintptr_t)(i + 1)); //+1 because 0 = no object
|
||||
_keys[i] = key; //Don't retain: already retained by Map
|
||||
|
||||
EOFLOGObjectLevelArgs(@"EOMKKD", @"key=%@ RETAINCOUNT=%d",
|
||||
|
@ -194,7 +194,7 @@ RCS_ID("$Id$")
|
|||
}
|
||||
|
||||
- (void) setObject: (id)object
|
||||
forIndex: (unsigned int)index
|
||||
forIndex: (NSUInteger)index
|
||||
dictionary: (NSMutableDictionary*)dictionary
|
||||
{
|
||||
//OK?
|
||||
|
@ -208,7 +208,7 @@ RCS_ID("$Id$")
|
|||
forKey: key];
|
||||
}
|
||||
|
||||
- (id) objectForIndex: (unsigned int)index
|
||||
- (id) objectForIndex: (NSUInteger)index
|
||||
dictionary: (NSDictionary*)dictionary
|
||||
{
|
||||
id key;
|
||||
|
@ -220,14 +220,14 @@ RCS_ID("$Id$")
|
|||
return [dictionary objectForKey: key];
|
||||
}
|
||||
|
||||
- (unsigned int) indexForKey: (id)key
|
||||
- (NSUInteger) indexForKey: (id)key
|
||||
{
|
||||
void *index = NSMapGet(_keyToIndex, (const void *)key);
|
||||
|
||||
if (!index)
|
||||
return NSNotFound;
|
||||
else
|
||||
return (unsigned int)(index - 1);
|
||||
return (NSUInteger)(index - 1);
|
||||
}
|
||||
|
||||
- (BOOL)hasKey: (id)key
|
||||
|
@ -379,7 +379,7 @@ RCS_ID("$Id$")
|
|||
return _keys;
|
||||
}
|
||||
|
||||
- (unsigned int) count
|
||||
- (NSUInteger) count
|
||||
{
|
||||
return _count;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue