ObjFW  Diff

Differences From Artifact [45871583e7]:

To Artifact [8411857262]:


22
23
24
25
26
27
28

29
30
31
32
33
34
35
#import "OFDataArray.h"
#import "OFFile.h"
#import "OFDate.h"

#import "autorelease.h"
#import "macros.h"


#import "OFInvalidFormatException.h"

@implementation OFZIPArchiveEntry
- (instancetype)OF_initWithFile: (OFFile*)file
{
	self = [super init];








>







22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#import "OFDataArray.h"
#import "OFFile.h"
#import "OFDate.h"

#import "autorelease.h"
#import "macros.h"

#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"

@implementation OFZIPArchiveEntry
- (instancetype)OF_initWithFile: (OFFile*)file
{
	self = [super init];

217
218
219
220
221
222
223

















224
	return _externalAttributes;
}

- (uint32_t)OF_localFileHeaderOffset
{
	return _localFileHeaderOffset;
}

















@end







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
	return _externalAttributes;
}

- (uint32_t)OF_localFileHeaderOffset
{
	return _localFileHeaderOffset;
}

- (of_comparison_result_t)compare: (id)object
{
	OFZIPArchiveEntry *entry;

	if (![object isKindOfClass: [OFZIPArchiveEntry class]])
		@throw [OFInvalidArgumentException exception];

	entry = object;

	if (_localFileHeaderOffset > entry->_localFileHeaderOffset)
		return OF_ORDERED_DESCENDING;
	if (_localFileHeaderOffset < entry->_localFileHeaderOffset)
		return OF_ORDERED_ASCENDING;

	return OF_ORDERED_SAME;
}
@end