Index: src/OFArray.m ================================================================== --- src/OFArray.m +++ src/OFArray.m @@ -428,11 +428,11 @@ size_t i, count; if (![object isKindOfClass: [OFArray class]]) return NO; - otherArray = (OFArray*)object; + otherArray = object; count = [array count]; if (count != [otherArray count]) return NO; Index: src/OFDataArray.m ================================================================== --- src/OFDataArray.m +++ src/OFDataArray.m @@ -328,11 +328,11 @@ OFDataArray *otherDataArray; if (![object isKindOfClass: [OFDataArray class]]) return NO; - otherDataArray = (OFDataArray*)object; + otherDataArray = object; if ([otherDataArray count] != count || [otherDataArray itemSize] != itemSize) return NO; if (memcmp([otherDataArray cArray], data, count * itemSize)) @@ -348,11 +348,11 @@ size_t otherCount, minimumCount; if (![object isKindOfClass: [OFDataArray class]]) @throw [OFInvalidArgumentException newWithClass: isa selector: _cmd]; - otherDataArray = (OFDataArray*)object; + otherDataArray = object; if ([otherDataArray itemSize] != itemSize) @throw [OFInvalidArgumentException newWithClass: isa selector: _cmd]; Index: src/OFDate.m ================================================================== --- src/OFDate.m +++ src/OFDate.m @@ -285,11 +285,11 @@ OFDate *otherDate; if (![object isKindOfClass: [OFDate class]]) return NO; - otherDate = (OFDate*)object; + otherDate = object; if (otherDate->seconds != seconds || otherDate->microseconds != microseconds) return NO; @@ -307,11 +307,11 @@ if (![object isKindOfClass: [OFDate class]]) @throw [OFInvalidArgumentException newWithClass: isa selector: _cmd]; - otherDate = (OFDate*)object; + otherDate = object; if (seconds < otherDate->seconds) return OF_ORDERED_ASCENDING; if (seconds > otherDate->seconds) return OF_ORDERED_DESCENDING; Index: src/OFList.m ================================================================== --- src/OFList.m +++ src/OFList.m @@ -227,11 +227,11 @@ of_list_object_t *iter, *iter2; if (![object isKindOfClass: [OFList class]]) return NO; - otherList = (OFList*)object; + otherList = object; if ([otherList count] != count) return NO; for (iter = firstListObject, iter2 = [otherList firstListObject]; Index: src/OFString.m ================================================================== --- src/OFString.m +++ src/OFString.m @@ -1127,11 +1127,11 @@ OFString *otherString; if (![object isKindOfClass: [OFString class]]) return NO; - otherString = (OFString*)object; + otherString = object; if (strcmp(string, [otherString cString])) return NO; return YES; @@ -1155,12 +1155,11 @@ 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) Index: src/OFURL.m ================================================================== --- src/OFURL.m +++ src/OFURL.m @@ -333,11 +333,11 @@ OFURL *otherURL; if (![object isKindOfClass: [OFURL class]]) return NO; - otherURL = (OFURL*)object; + otherURL = object; if (![otherURL->scheme isEqual: scheme]) return NO; if (![otherURL->host isEqual: host]) return NO; Index: tests/OFURLTests.m ================================================================== --- tests/OFURLTests.m +++ tests/OFURLTests.m @@ -75,10 +75,11 @@ TEST(@"-[copy]", R(u4 = [[u1 copy] autorelease])) TEST(@"-[isEqual:]", [u1 isEqual: u4] && ![u2 isEqual: u3] && [[OFURL URLWithString: @"http://bar/"] isEqual: u3]) + TEST(@"-[hash:]", [u1 hash] == [u4 hash] && [u2 hash] != [u3 hash]) EXPECT_EXCEPTION(@"Detection of invalid format", OFInvalidFormatException, [OFURL URLWithString: @"http"])