Skip to content

Commit

Permalink
Merge pull request #3120 from lioncash/osx
Browse files Browse the repository at this point in the history
InputCommon: Use NSNumber numeric literals in Obj-C code
  • Loading branch information
lioncash committed Oct 2, 2015
2 parents fb35371 + a306818 commit 37825c5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Expand Up @@ -23,8 +23,8 @@
{
// Buttons
NSDictionary *buttonDict = @{
@kIOHIDElementTypeKey : [NSNumber numberWithInteger: kIOHIDElementTypeInput_Button],
@kIOHIDElementUsagePageKey : [NSNumber numberWithInteger: kHIDPage_Button]
@kIOHIDElementTypeKey : @(kIOHIDElementTypeInput_Button),
@kIOHIDElementUsagePageKey : @(kHIDPage_Button)
};

CFArrayRef buttons = IOHIDDeviceCopyMatchingElements(m_device,
Expand All @@ -45,7 +45,7 @@

// Axes
NSDictionary *axisDict = @{
@kIOHIDElementTypeKey : [NSNumber numberWithInteger: kIOHIDElementTypeInput_Misc]
@kIOHIDElementTypeKey : @(kIOHIDElementTypeInput_Misc)
};

CFArrayRef axes = IOHIDDeviceCopyMatchingElements(m_device,
Expand Down
Expand Up @@ -23,9 +23,9 @@
// This class should only recieve Keyboard or Keypad devices
// Now, filter on just the buttons we can handle sanely
NSDictionary *matchingElements = @{
@kIOHIDElementTypeKey : [NSNumber numberWithInteger: kIOHIDElementTypeInput_Button],
@kIOHIDElementMinKey : [NSNumber numberWithInteger: 0],
@kIOHIDElementMaxKey : [NSNumber numberWithInteger: 1]
@kIOHIDElementTypeKey : @(kIOHIDElementTypeInput_Button),
@kIOHIDElementMinKey : @0,
@kIOHIDElementMaxKey : @1
};

CFArrayRef elements = IOHIDDeviceCopyMatchingElements(m_device,
Expand Down

0 comments on commit 37825c5

Please sign in to comment.