ObjXMPP  Diff

Differences From Artifact [2b87940ac6]:

To Artifact [ced62b3025]:


237
238
239
240
241
242
243


244
245

246
247
248
249
250
251
252










253
254
255
		return YES;

	if (![object isKindOfClass: [XMPPJID class]])
		return NO;

	JID = object;



	if ([_node isEqual: JID->_node] && [_domain isEqual: JID->_domain] &&
	    [_resource isEqual: JID->_resource])

		return YES;

	return NO;
}

- (uint32_t) hash
{










	return [[self fullJID] hash];
}
@end







>
>
|
|
>







>
>
>
>
>
>
>
>
>
>
|


237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
		return YES;

	if (![object isKindOfClass: [XMPPJID class]])
		return NO;

	JID = object;

	// Node and resource may be nil
	if ((_node == JID->_node || [_node isEqual: JID->_node]) &&
	    [_domain isEqual: JID->_domain] &&
	    (_resource == JID->_resource || [_resource isEqual: JID->_resource])
	   )
		return YES;

	return NO;
}

- (uint32_t) hash
{
	uint32_t hash;

	OF_HASH_INIT(hash);

	OF_HASH_ADD_HASH(hash, [_node hash]);
	OF_HASH_ADD_HASH(hash, [_domain hash]);
	OF_HASH_ADD_HASH(hash, [_resource hash]);

	OF_HASH_FINALIZE(hash);

	return hash;
}
@end