ObjXMPP  Diff

Differences From Artifact [b650ac13b8]:

To Artifact [2470b625ea]:


207
208
209
210
211
212
213

214
215
216
217
218
219
220
221
222
223
224
225



226

227



228
229
230
231
232
233
234
{
	return [[priority copy] autorelease];
}

- (of_comparison_result_t)compare: (id <OFComparing>)object
{
	XMPPPresence *otherPresence;

	OFString *otherShow;
	of_comparison_result_t priorityOrder;

	if (object == self)
		return OF_ORDERED_SAME;

	if (![object isKindOfClass: [XMPPPresence class]])
		@throw [OFInvalidArgumentException
		    exceptionWithClass: [self class]
			      selector: _cmd];

	otherPresence = (XMPPPresence*)object;





	priorityOrder = [priority compare: [otherPresence priority]];




	if (priorityOrder != OF_ORDERED_SAME)
		return priorityOrder;

	otherShow = [otherPresence show];
	if ([show isEqual: otherShow])
		return OF_ORDERED_SAME;







>












>
>
>

>
|
>
>
>







207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
{
	return [[priority copy] autorelease];
}

- (of_comparison_result_t)compare: (id <OFComparing>)object
{
	XMPPPresence *otherPresence;
	OFNumber *otherPriority;
	OFString *otherShow;
	of_comparison_result_t priorityOrder;

	if (object == self)
		return OF_ORDERED_SAME;

	if (![object isKindOfClass: [XMPPPresence class]])
		@throw [OFInvalidArgumentException
		    exceptionWithClass: [self class]
			      selector: _cmd];

	otherPresence = (XMPPPresence*)object;
	otherPriority = [otherPresence priority];
	if (otherPriority == nil)
		otherPriority = [OFNumber numberWithInt8: 0];

	if (priority != nil)
		priorityOrder = [priority compare: otherPriority];
	else
		priorityOrder =
		    [[OFNumber numberWithInt8: 0] compare: otherPriority];

	if (priorityOrder != OF_ORDERED_SAME)
		return priorityOrder;

	otherShow = [otherPresence show];
	if ([show isEqual: otherShow])
		return OF_ORDERED_SAME;