mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Changed keys argument type to (const id <NSCopying>[]) in
-[NSDictionary initWithObjects:forKeys:count:] and +dictionaryWithObjects:forKeys:count:, to follow the current Cocoa API. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37431 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
805cf33e93
commit
52fa3a2c07
6 changed files with 24 additions and 13 deletions
|
@ -185,7 +185,7 @@ static SEL objSel;
|
|||
|
||||
/* Designated initialiser */
|
||||
- (id) initWithObjects: (const id[])objs
|
||||
forKeys: (const id[])keys
|
||||
forKeys: (const id <NSCopying>[])keys
|
||||
count: (NSUInteger)c
|
||||
{
|
||||
NSUInteger i;
|
||||
|
@ -208,7 +208,7 @@ static SEL objSel;
|
|||
format: @"Tried to init dictionary with nil value"];
|
||||
}
|
||||
|
||||
node = GSIMapNodeForKey(&map, (GSIMapKey)keys[i]);
|
||||
node = GSIMapNodeForKey(&map, (GSIMapKey)(id)keys[i]);
|
||||
if (node)
|
||||
{
|
||||
IF_NO_GC(RETAIN(objs[i]));
|
||||
|
@ -217,7 +217,7 @@ static SEL objSel;
|
|||
}
|
||||
else
|
||||
{
|
||||
GSIMapAddPair(&map, (GSIMapKey)keys[i], (GSIMapVal)objs[i]);
|
||||
GSIMapAddPair(&map, (GSIMapKey)(id)keys[i], (GSIMapVal)objs[i]);
|
||||
}
|
||||
}
|
||||
return self;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue