ObjFW  Diff

Differences From Artifact [6df5a31603]:

To Artifact [24bf0bd650]:


1125
1126
1127
1128
1129
1130
1131
1132

1133
1134
1135
1136
1137
1138
1139
1125
1126
1127
1128
1129
1130
1131

1132
1133
1134
1135
1136
1137
1138
1139







-
+







- (BOOL)isEqual: (id)object
{
	OFString *otherString;

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

	otherString = (OFString*)object;
	otherString = object;

	if (strcmp(string, [otherString cString]))
		return NO;

	return YES;
}

1153
1154
1155
1156
1157
1158
1159
1160

1161
1162
1163
1164
1165
1166
1167
1168
1153
1154
1155
1156
1157
1158
1159

1160

1161
1162
1163
1164
1165
1166
1167







-
+
-







	size_t otherLen, minLen;
	int cmp;

	if (![object isKindOfClass: [OFString class]])
		@throw [OFInvalidArgumentException newWithClass: isa
						       selector: _cmd];

	otherString = (OFString*)object;
	otherString = object;

	otherLen = [otherString cStringLength];
	minLen = (length > otherLen ? otherLen : length);

	if ((cmp = memcmp(string, [otherString cString], minLen)) == 0) {
		if (length > otherLen)
			return OF_ORDERED_DESCENDING;
		if (length < otherLen)