@@ -187,12 +187,12 @@ uintmax_t size; @try { OFFile *file; - size = [[[OFFileManager defaultManager] - attributesOfItemAtPath: path] fileSize]; + size = [[OFFileManager defaultManager] + attributesOfItemAtPath: path].fileSize; # if UINTMAX_MAX > SIZE_MAX if (size > SIZE_MAX) @throw [OFOutOfRangeException exception]; # endif @@ -251,11 +251,11 @@ _count = 0; pageSize = [OFSystemInfo pageSize]; buffer = [self allocMemoryWithSize: pageSize]; - while (![stream isAtEndOfStream]) { + while (!stream.atEndOfStream) { size_t length = [stream readIntoBuffer: buffer length: pageSize]; if (SIZE_MAX - _count < length) @throw [OFOutOfRangeException exception]; @@ -336,11 +336,11 @@ if (!mutable) { [self release]; self = [OFMutableData alloc]; } - self = [(OFMutableData *)self initWithCapacity: [string length] / 3]; + self = [(OFMutableData *)self initWithCapacity: string.length / 3]; @try { if (!of_base64_decode((OFMutableData *)self, [string cStringWithEncoding: OF_STRING_ENCODING_ASCII], [string cStringLengthWithEncoding: @@ -361,15 +361,15 @@ { void *pool = objc_autoreleasePoolPush(); OFString *stringValue; @try { - if (![[element name] isEqual: [self className]] || - ![[element namespace] isEqual: OF_SERIALIZATION_NS]) + if (![element.name isEqual: self.className] || + ![element.namespace isEqual: OF_SERIALIZATION_NS]) @throw [OFInvalidArgumentException exception]; - stringValue = [element stringValue]; + stringValue = element.stringValue; } @catch (id e) { [self release]; @throw e; } @@ -446,13 +446,13 @@ if (![object isKindOfClass: [OFData class]]) return false; data = object; - if ([data count] != _count || [data itemSize] != _itemSize) + if (data.count != _count || data.itemSize != _itemSize) return false; - if (memcmp([data items], _items, _count * _itemSize) != 0) + if (memcmp(data.items, _items, _count * _itemSize) != 0) return false; return true; } @@ -465,17 +465,17 @@ if (![(id)object isKindOfClass: [OFData class]]) @throw [OFInvalidArgumentException exception]; data = (OFData *)object; - if ([data itemSize] != _itemSize) + if (data.itemSize != _itemSize) @throw [OFInvalidArgumentException exception]; - count = [data count]; + count = data.count; minCount = (_count > count ? count : _count); - if ((comparison = memcmp(_items, [data items], + if ((comparison = memcmp(_items, data.items, minCount * _itemSize)) == 0) { if (_count > count) return OF_ORDERED_DESCENDING; if (_count < count) return OF_ORDERED_ASCENDING; @@ -564,20 +564,20 @@ if (range.length > SIZE_MAX - range.location || range.location + range.length > _count) @throw [OFOutOfRangeException exception]; - if (data == nil || [data itemSize] != _itemSize) + if (data == nil || data.itemSize != _itemSize) @throw [OFInvalidArgumentException exception]; - if ((searchLength = [data count]) == 0) + if ((searchLength = data.count) == 0) return of_range(0, 0); if (searchLength > range.length) return of_range(OF_NOT_FOUND, 0); - search = [data items]; + search = data.items; if (options & OF_DATA_SEARCH_BACKWARDS) { for (size_t i = range.length - searchLength;; i--) { if (memcmp(_items + i * _itemSize, search, searchLength * _itemSize) == 0) @@ -637,11 +637,11 @@ if (_itemSize != 1) @throw [OFInvalidArgumentException exception]; pool = objc_autoreleasePoolPush(); element = [OFXMLElement - elementWithName: [self className] + elementWithName: self.className namespace: OF_SERIALIZATION_NS stringValue: of_base64_encode(_items, _count * _itemSize)]; [element retain];