ObjFW  Diff

Differences From Artifact [6b6d81b49f]:

To Artifact [f72d5b6aa0]:


115
116
117
118
119
120
121












122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138












139
140
141
142
143
144
145
		if ([objs[i] isEqual: obj]) {
			OFObject *obj = objs[i];

			[array removeItemAtIndex: i];
			mutations++;

			[obj release];












		}
	}

	return self;
}

- removeObjectIdenticalTo: (OFObject*)obj
{
	OFObject **objs = [array cArray];
	size_t i, count = [array count];

	for (i = 0; i < count; i++) {
		if (objs[i] == obj) {
			[array removeItemAtIndex: i];
			mutations++;

			[obj release];












		}
	}

	return self;
}

- removeObjectAtIndex: (size_t)index







>
>
>
>
>
>
>
>
>
>
>
>

















>
>
>
>
>
>
>
>
>
>
>
>







115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
		if ([objs[i] isEqual: obj]) {
			OFObject *obj = objs[i];

			[array removeItemAtIndex: i];
			mutations++;

			[obj release];

			/*
			 * We need to get the C array again as it might have
			 * been relocated. We also need to adjust the count
			 * as otherwise we would have an out of bounds access.
			 * As another object will be at the current index now,
			 * we also need to handle the same index again, thus we
			 * decrease it.
			 */
			objs = [array cArray];
			count--;
			i--;
		}
	}

	return self;
}

- removeObjectIdenticalTo: (OFObject*)obj
{
	OFObject **objs = [array cArray];
	size_t i, count = [array count];

	for (i = 0; i < count; i++) {
		if (objs[i] == obj) {
			[array removeItemAtIndex: i];
			mutations++;

			[obj release];

			/*
			 * We need to get the C array again as it might have
			 * been relocated. We also need to adjust the count
			 * as otherwise we would have an out of bounds access.
			 * As another object will be at the current index now,
			 * we also need to handle the same index again, thus we
			 * decrease it.
			 */
			objs = [array cArray];
			count--;
			i--;
		}
	}

	return self;
}

- removeObjectAtIndex: (size_t)index