summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLOnButtonPress.m
diff options
context:
space:
mode:
Diffstat (limited to 'SmartDeviceLink/SDLOnButtonPress.m')
-rw-r--r--SmartDeviceLink/SDLOnButtonPress.m20
1 files changed, 6 insertions, 14 deletions
diff --git a/SmartDeviceLink/SDLOnButtonPress.m b/SmartDeviceLink/SDLOnButtonPress.m
index 8926b7951..29db5d0b1 100644
--- a/SmartDeviceLink/SDLOnButtonPress.m
+++ b/SmartDeviceLink/SDLOnButtonPress.m
@@ -22,7 +22,7 @@
return self;
}
-- (void)setButtonName:(SDLButtonName *)buttonName {
+- (void)setButtonName:(SDLButtonName)buttonName {
if (buttonName != nil) {
[parameters setObject:buttonName forKey:NAMES_buttonName];
} else {
@@ -30,16 +30,12 @@
}
}
-- (SDLButtonName *)buttonName {
+- (SDLButtonName)buttonName {
NSObject *obj = [parameters objectForKey:NAMES_buttonName];
- if (obj == nil || [obj isKindOfClass:SDLButtonName.class]) {
- return (SDLButtonName *)obj;
- } else {
- return [SDLButtonName valueOf:(NSString *)obj];
- }
+ return (SDLButtonName)obj;
}
-- (void)setButtonPressMode:(SDLButtonPressMode *)buttonPressMode {
+- (void)setButtonPressMode:(SDLButtonPressMode)buttonPressMode {
if (buttonPressMode != nil) {
[parameters setObject:buttonPressMode forKey:NAMES_buttonPressMode];
} else {
@@ -47,13 +43,9 @@
}
}
-- (SDLButtonPressMode *)buttonPressMode {
+- (SDLButtonPressMode)buttonPressMode {
NSObject *obj = [parameters objectForKey:NAMES_buttonPressMode];
- if (obj == nil || [obj isKindOfClass:SDLButtonPressMode.class]) {
- return (SDLButtonPressMode *)obj;
- } else {
- return [SDLButtonPressMode valueOf:(NSString *)obj];
- }
+ return (SDLButtonPressMode)obj;
}
- (void)setCustomButtonID:(NSNumber *)customButtonID {