@@ -146,12 +146,12 @@ size_t of_zip_archive_entry_extra_field_find(OFData *extraField, uint16_t tag, uint16_t *size) { - const uint8_t *bytes = [extraField items]; - size_t count = [extraField count]; + const uint8_t *bytes = extraField.items; + size_t count = extraField.count; for (size_t i = 0; i < count;) { uint16_t currentTag, currentSize; if (i + 3 >= count) @@ -191,11 +191,11 @@ self = [super init]; @try { void *pool = objc_autoreleasePoolPush(); - if ([fileName UTF8StringLength] > UINT16_MAX) + if (fileName.UTF8StringLength > UINT16_MAX) @throw [OFOutOfRangeException exception]; _fileName = [fileName copy]; objc_autoreleasePoolPop(pool); @@ -280,11 +280,11 @@ @throw [OFInvalidFormatException exception]; [extraField removeItemsInRange: range]; } - if ([extraField count] > 0) { + if (extraField.count > 0) { [extraField makeImmutable]; _extraField = [extraField copy]; } objc_autoreleasePoolPop(pool); @@ -449,13 +449,13 @@ @"\tCompression method = %@\n" @"\tModification date = %@\n" @"\tCRC32 = %08" @PRIX32 @"\n" @"\tExtra field = %@\n" @">", - [self class], _fileName, _fileComment, _generalPurposeBitFlag, + self.class, _fileName, _fileComment, _generalPurposeBitFlag, _compressedSize, _uncompressedSize, compressionMethod, - [self modificationDate], _CRC32, _extraField]; + self.modificationDate, _CRC32, _extraField]; [ret retain]; objc_autoreleasePoolPop(pool); @@ -465,11 +465,11 @@ - (uint64_t)of_writeToStream: (OFStream *)stream { void *pool = objc_autoreleasePoolPush(); uint64_t size = 0; - if (UINT16_MAX - [_extraField count] < 32) + if (UINT16_MAX - _extraField.count < 32) @throw [OFOutOfRangeException exception]; [stream writeLittleEndianInt32: 0x02014B50]; [stream writeLittleEndianInt16: _versionMadeBy]; [stream writeLittleEndianInt16: _minVersionNeeded]; @@ -478,22 +478,22 @@ [stream writeLittleEndianInt16: _lastModifiedFileTime]; [stream writeLittleEndianInt16: _lastModifiedFileDate]; [stream writeLittleEndianInt32: _CRC32]; [stream writeLittleEndianInt32: 0xFFFFFFFF]; [stream writeLittleEndianInt32: 0xFFFFFFFF]; - [stream writeLittleEndianInt16: (uint16_t)[_fileName UTF8StringLength]]; - [stream writeLittleEndianInt16: (uint16_t)[_extraField count] + 32]; + [stream writeLittleEndianInt16: (uint16_t)_fileName.UTF8StringLength]; + [stream writeLittleEndianInt16: (uint16_t)_extraField.count + 32]; [stream writeLittleEndianInt16: - (uint16_t)[_fileComment UTF8StringLength]]; + (uint16_t)_fileComment.UTF8StringLength]; [stream writeLittleEndianInt16: 0xFFFF]; [stream writeLittleEndianInt16: _internalAttributes]; [stream writeLittleEndianInt32: _versionSpecificAttributes]; [stream writeLittleEndianInt32: 0xFFFFFFFF]; size += (4 + (6 * 2) + (3 * 4) + (5 * 2) + (2 * 4)); [stream writeString: _fileName]; - size += (uint64_t)[_fileName UTF8StringLength]; + size += (uint64_t)_fileName.UTF8StringLength; [stream writeLittleEndianInt16: OF_ZIP_ARCHIVE_ENTRY_EXTRA_FIELD_ZIP64]; [stream writeLittleEndianInt16: 28]; [stream writeLittleEndianInt64: _uncompressedSize]; [stream writeLittleEndianInt64: _compressedSize]; @@ -501,16 +501,16 @@ [stream writeLittleEndianInt32: _startDiskNumber]; size += (2 * 2) + (3 * 8) + 4; if (_extraField != nil) [stream writeData: _extraField]; - size += (uint64_t)[_extraField count]; + size += (uint64_t)_extraField.count; if (_fileComment != nil) [stream writeString: _fileComment]; - size += (uint64_t)[_fileComment UTF8StringLength]; + size += (uint64_t)_fileComment.UTF8StringLength; objc_autoreleasePoolPop(pool); return size; } @end