ObjFW  Diff

Differences From Artifact [5743167b4f]:

To Artifact [13adfb2ee6]:


934
935
936
937
938
939
940
941

942
943
944
945
946
947
948
949
950

951
952
953
954
955
956
957
934
935
936
937
938
939
940

941
942
943
944
945
946
947
948
949

950
951
952
953
954
955
956
957







-
+








-
+








	if (type & OF_NUMBER_SIGNED || number->type & OF_NUMBER_SIGNED)
		return ([number intMaxValue] == [self intMaxValue]);

	return ([number uIntMaxValue] == [self uIntMaxValue]);
}

- (of_comparison_result_t)compare: (id)object
- (of_comparison_result_t)compare: (id <OFComparing>)object
{
	OFNumber *number;

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

	number = object;
	number = (OFNumber*)object;

	if (type & OF_NUMBER_FLOAT || number->type & OF_NUMBER_FLOAT) {
		double double1 = [self doubleValue];
		double double2 = [number doubleValue];

		if (double1 > double2)
			return OF_ORDERED_DESCENDING;