diff options
-rw-r--r-- | SmartDeviceLink/SDLAddCommand.m | 7 | ||||
-rw-r--r-- | SmartDeviceLink/SDLRPCStruct.h | 2 | ||||
-rw-r--r-- | SmartDeviceLink/SDLRPCStruct.m | 7 | ||||
-rw-r--r-- | SmartDeviceLink/SDLSoftButton.m | 7 | ||||
-rw-r--r-- | SmartDeviceLink/SDLSubscribeButton.m | 7 |
5 files changed, 29 insertions, 1 deletions
diff --git a/SmartDeviceLink/SDLAddCommand.m b/SmartDeviceLink/SDLAddCommand.m index 4a5cb6659..8c491359b 100644 --- a/SmartDeviceLink/SDLAddCommand.m +++ b/SmartDeviceLink/SDLAddCommand.m @@ -100,6 +100,13 @@ NS_ASSUME_NONNULL_BEGIN return [parameters sdl_objectForName:SDLNameCommandIcon ofClass:SDLImage.class]; } +-(id)copyWithZone:(nullable NSZone *)zone { + SDLAddCommand *newCommand = [super copyWithZone:zone]; + newCommand->_handler = self.handler; + + return newCommand; +} + @end NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLRPCStruct.h b/SmartDeviceLink/SDLRPCStruct.h index 3a6243d21..224dfd30e 100644 --- a/SmartDeviceLink/SDLRPCStruct.h +++ b/SmartDeviceLink/SDLRPCStruct.h @@ -8,7 +8,7 @@ NS_ASSUME_NONNULL_BEGIN -@interface SDLRPCStruct : NSObject { +@interface SDLRPCStruct : NSObject <NSCopying> { NSMutableDictionary<NSString *, id> *store; } diff --git a/SmartDeviceLink/SDLRPCStruct.m b/SmartDeviceLink/SDLRPCStruct.m index 4c8b81c29..01b514f24 100644 --- a/SmartDeviceLink/SDLRPCStruct.m +++ b/SmartDeviceLink/SDLRPCStruct.m @@ -75,6 +75,13 @@ NS_ASSUME_NONNULL_BEGIN return ret; } +-(id)copyWithZone:(nullable NSZone *)zone { + SDLRPCStruct *newStruct = [[[self class] allocWithZone:zone] init]; + newStruct->store = [self->store copy]; + + return newStruct; +} + @end NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLSoftButton.m b/SmartDeviceLink/SDLSoftButton.m index 9f9a5c21e..c33880c06 100644 --- a/SmartDeviceLink/SDLSoftButton.m +++ b/SmartDeviceLink/SDLSoftButton.m @@ -87,6 +87,13 @@ NS_ASSUME_NONNULL_BEGIN return [store sdl_objectForName:SDLNameSystemAction]; } +-(id)copyWithZone:(nullable NSZone *)zone { + SDLSoftButton *newButton = [super copyWithZone:zone]; + newButton->_handler = self.handler; + + return newButton; +} + @end NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLSubscribeButton.m b/SmartDeviceLink/SDLSubscribeButton.m index 50d9ac37b..07a2fe65c 100644 --- a/SmartDeviceLink/SDLSubscribeButton.m +++ b/SmartDeviceLink/SDLSubscribeButton.m @@ -48,6 +48,13 @@ NS_ASSUME_NONNULL_BEGIN return [parameters sdl_objectForName:SDLNameButtonName]; } +-(id)copyWithZone:(nullable NSZone *)zone { + SDLSubscribeButton *newButton = [super copyWithZone:zone]; + newButton->_handler = self.handler; + + return newButton; +} + @end NS_ASSUME_NONNULL_END |