projects
/
enjoyable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve size in a number of pathological cases.
[enjoyable.git]
/
JSActionButton.m
diff --git
a/JSActionButton.m
b/JSActionButton.m
index
f6a0fa7
..
7d2572a
100644
(file)
--- a/
JSActionButton.m
+++ b/
JSActionButton.m
@@
-5,31
+5,29
@@
// Created by Sam McCall on 5/05/09.
//
// Created by Sam McCall on 5/05/09.
//
+#import "JSActionButton.h"
+
@implementation JSActionButton {
@implementation JSActionButton {
-
BOOL active
;
+
long _max
;
}
}
-@synthesize max;
-@synthesize active;
-
-- (id)initWithName:(NSString *)name_ idx:(int)idx max:(int)max_ {
+- (id)initWithName:(NSString *)name idx:(int)idx max:(long)max {
if ((self = [super init])) {
if ((self = [super init])) {
- self.index = idx;
- self.max = max_;
- if (name_.length)
- self.name = [NSString stringWithFormat:@"Button %d - %@", self.index, name_];
+ _max = max;
+ if (name.length)
+ self.name = [NSString stringWithFormat:@"Button %d - %@", idx, name];
else
else
- self.name = [NSString stringWithFormat:@"Button %d",
self.inde
x];
+ self.name = [NSString stringWithFormat:@"Button %d",
id
x];
}
return self;
}
- (id)findSubActionForValue:(IOHIDValueRef)val {
}
return self;
}
- (id)findSubActionForValue:(IOHIDValueRef)val {
- return (IOHIDValueGetIntegerValue(val) == max) ? self : nil;
+ return (IOHIDValueGetIntegerValue(val) ==
_
max) ? self : nil;
}
- (void)notifyEvent:(IOHIDValueRef)value {
}
- (void)notifyEvent:(IOHIDValueRef)value {
-
active = IOHIDValueGetIntegerValue(value) ==
max;
+
self.active = IOHIDValueGetIntegerValue(value) == _
max;
}
@end
}
@end