mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
([ConstantCollection -detectObjectByInvoking:]): Set detectedObject to
nil to avoid warning. ([ConstantCollection -maxObject]): Initialize MAX to nil. ([ConstantCollection -minObject]): Initialize MIN to nil. ([Collection -uniqueContents]): Iterate over CP, not SELF. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1152 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
9bdb46c614
commit
874e4c358e
1 changed files with 5 additions and 10 deletions
|
@ -300,7 +300,7 @@
|
||||||
- detectObjectByInvoking: (id <Invoking>)anInvocation;
|
- detectObjectByInvoking: (id <Invoking>)anInvocation;
|
||||||
{
|
{
|
||||||
BOOL flag = YES;
|
BOOL flag = YES;
|
||||||
id detectedObject;
|
id detectedObject = nil;
|
||||||
id o;
|
id o;
|
||||||
|
|
||||||
FOR_COLLECTION_WHILE_TRUE(self, o, flag)
|
FOR_COLLECTION_WHILE_TRUE(self, o, flag)
|
||||||
|
@ -321,11 +321,9 @@
|
||||||
|
|
||||||
- maxObject
|
- maxObject
|
||||||
{
|
{
|
||||||
id o, max;
|
id o, max = nil;
|
||||||
BOOL firstTime = YES;
|
BOOL firstTime = YES;
|
||||||
|
|
||||||
if (![self count])
|
|
||||||
return NO_OBJECT;
|
|
||||||
FOR_COLLECTION(self, o)
|
FOR_COLLECTION(self, o)
|
||||||
{
|
{
|
||||||
if (firstTime)
|
if (firstTime)
|
||||||
|
@ -345,11 +343,9 @@
|
||||||
|
|
||||||
- minObject
|
- minObject
|
||||||
{
|
{
|
||||||
id o, min;
|
id o, min = nil;
|
||||||
BOOL firstTime = YES;
|
BOOL firstTime = YES;
|
||||||
|
|
||||||
if (![self count])
|
|
||||||
return NO_OBJECT;
|
|
||||||
FOR_COLLECTION(self, o)
|
FOR_COLLECTION(self, o)
|
||||||
{
|
{
|
||||||
if (firstTime)
|
if (firstTime)
|
||||||
|
@ -649,7 +645,6 @@
|
||||||
{
|
{
|
||||||
id *content_array;
|
id *content_array;
|
||||||
unsigned int count, i;
|
unsigned int count, i;
|
||||||
id o;
|
|
||||||
|
|
||||||
[aCoder decodeValueOfCType:@encode(unsigned)
|
[aCoder decodeValueOfCType:@encode(unsigned)
|
||||||
at:&count
|
at:&count
|
||||||
|
@ -795,7 +790,7 @@
|
||||||
int count;
|
int count;
|
||||||
id o;
|
id o;
|
||||||
|
|
||||||
FOR_COLLECTION(self, o)
|
FOR_COLLECTION(cp, o)
|
||||||
{
|
{
|
||||||
count = [self occurrencesOfObject: o];
|
count = [self occurrencesOfObject: o];
|
||||||
if (!count)
|
if (!count)
|
||||||
|
@ -803,7 +798,7 @@
|
||||||
while (count--)
|
while (count--)
|
||||||
[self removeObject: o];
|
[self removeObject: o];
|
||||||
}
|
}
|
||||||
END_FOR_COLLECTION(self);
|
END_FOR_COLLECTION(cp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* May be inefficient. Could be overridden; */
|
/* May be inefficient. Could be overridden; */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue