projects
/
enjoyable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
79b05c3
)
Style issues. Remove dead code.
author
Joe Wreschnig
<joe.wreschnig@gmail.com>
Wed, 13 Mar 2013 17:32:10 +0000
(18:32 +0100)
committer
Joe Wreschnig
<joe.wreschnig@gmail.com>
Wed, 13 Mar 2013 17:32:10 +0000
(18:32 +0100)
Classes/NJDevice.m
patch
|
blob
|
history
diff --git
a/Classes/NJDevice.m
b/Classes/NJDevice.m
index
a5efd96
..
3b0cc6a
100644
(file)
--- a/
Classes/NJDevice.m
+++ b/
Classes/NJDevice.m
@@
-61,16
+61,16
@@
static NSArray *InputsForElement(IOHIDDeviceRef device, id base) {
}
@implementation NJDevice {
}
@implementation NJDevice {
- int vendorId;
- int productId;
+ int
_
vendorId;
+ int
_
productId;
}
- (id)initWithDevice:(IOHIDDeviceRef)dev {
if ((self = [super initWithName:nil did:nil base:nil])) {
self.device = dev;
self.productName = (__bridge NSString *)IOHIDDeviceGetProperty(dev, CFSTR(kIOHIDProductKey));
}
- (id)initWithDevice:(IOHIDDeviceRef)dev {
if ((self = [super initWithName:nil did:nil base:nil])) {
self.device = dev;
self.productName = (__bridge NSString *)IOHIDDeviceGetProperty(dev, CFSTR(kIOHIDProductKey));
- vendorId = [(__bridge NSNumber *)IOHIDDeviceGetProperty(dev, CFSTR(kIOHIDVendorIDKey)) intValue];
- productId = [(__bridge NSNumber *)IOHIDDeviceGetProperty(dev, CFSTR(kIOHIDProductIDKey)) intValue];
+
_
vendorId = [(__bridge NSNumber *)IOHIDDeviceGetProperty(dev, CFSTR(kIOHIDVendorIDKey)) intValue];
+
_
productId = [(__bridge NSNumber *)IOHIDDeviceGetProperty(dev, CFSTR(kIOHIDProductIDKey)) intValue];
self.children = InputsForElement(dev, self);
}
return self;
self.children = InputsForElement(dev, self);
}
return self;
@@
-80,12
+80,8
@@
static NSArray *InputsForElement(IOHIDDeviceRef device, id base) {
return [NSString stringWithFormat:@"%@ #%d", _productName, _index];
}
return [NSString stringWithFormat:@"%@ #%d", _productName, _index];
}
-- (id)base {
- return nil;
-}
-
- (NSString *)uid {
- (NSString *)uid {
- return [NSString stringWithFormat: @"%d:%d:%d",
vendorId,
productId, _index];
+ return [NSString stringWithFormat: @"%d:%d:%d",
_vendorId, _
productId, _index];
}
- (NJInput *)findInputByCookie:(IOHIDElementCookie)cookie {
}
- (NJInput *)findInputByCookie:(IOHIDElementCookie)cookie {