Cube  Diff

Differences From Artifact [5ee318d452]:

To Artifact [c51eda1a22]:


1
2
3
4

5
6

7
8
9

10
11
12
13
14
15
16
17
18
19

20
21
22
23

24
25
26
27
28
29
30
1
2
3

4
5

6
7
8

9
10
11
12
13
14
15
16
17
18

19
20
21
22

23
24
25
26
27
28
29
30



-
+

-
+


-
+









-
+



-
+







#import "MenuItem.h"

@implementation MenuItem
+ (instancetype)itemWithText:(OFString *)text action:(OFString *)action
+ (instancetype)itemWithText: (OFString *)text action: (OFString *)action
{
	return [[self alloc] initWithText:text action:action];
	return [[self alloc] initWithText: text action: action];
}

- (instancetype)initWithText:(OFString *)text action:(OFString *)action
- (instancetype)initWithText: (OFString *)text action: (OFString *)action
{
	self = [super init];

	_text = [text copy];
	_action = [action copy];

	return self;
}

- (OFComparisonResult)compare:(id)otherObject
- (OFComparisonResult)compare: (id)otherObject
{
	MenuItem *otherItem;

	if (![otherObject isKindOfClass:MenuItem.class])
	if (![otherObject isKindOfClass: MenuItem.class])
		@throw [OFInvalidArgumentException exception];

	int x, y;
	@try {
		x = _text.intValue;
	} @catch (OFInvalidFormatException *e) {
		x = 0;