diff --git a/apple/Utils/RNSVGFabricConversions.h b/apple/Utils/RNSVGFabricConversions.h index e2973f52c..e256bfa4f 100644 --- a/apple/Utils/RNSVGFabricConversions.h +++ b/apple/Utils/RNSVGFabricConversions.h @@ -11,7 +11,7 @@ #import template -RNSVGBrush *brushFromColorStruct(T fillObject) +RNSVGBrush *brushFromColorStruct(const T &fillObject) { int type = fillObject.type; @@ -43,7 +43,7 @@ RNSVGBrush *brushFromColorStruct(T fillObject) } template -void setCommonNodeProps(T nodeProps, RNSVGNode *node) +void setCommonNodeProps(const T &nodeProps, RNSVGNode *node) { node.name = RCTNSStringFromStringNilIfEmpty(nodeProps.name); node.opacity = nodeProps.opacity; @@ -87,7 +87,7 @@ void setCommonNodeProps(T nodeProps, RNSVGNode *node) node.accessibilityLabel = RCTNSStringFromStringNilIfEmpty(nodeProps.accessibilityLabel); } -static NSMutableArray *createLengthArrayFromStrings(std::vector stringArray) +static NSMutableArray *createLengthArrayFromStrings(const std::vector &stringArray) { if (stringArray.empty()) { return nil; @@ -101,7 +101,7 @@ static NSMutableArray *createLengthArrayFromStrings(std::vector -void setCommonRenderableProps(T renderableProps, RNSVGRenderable *renderableNode) +void setCommonRenderableProps(const T &renderableProps, RNSVGRenderable *renderableNode) { setCommonNodeProps(renderableProps, renderableNode); renderableNode.fill = brushFromColorStruct(renderableProps.fill); @@ -132,7 +132,7 @@ void setCommonRenderableProps(T renderableProps, RNSVGRenderable *renderableNode } } -static void addValueToDict(NSMutableDictionary *dict, std::string value, NSString *key) +static void addValueToDict(NSMutableDictionary *dict, const std::string &value, NSString *key) { NSString *valueOrNil = RCTNSStringFromStringNilIfEmpty(value); if (valueOrNil) { @@ -141,7 +141,7 @@ static void addValueToDict(NSMutableDictionary *dict, std::string value, NSStrin } template -NSDictionary *parseFontStruct(T fontStruct) +NSDictionary *parseFontStruct(const T &fontStruct) { NSMutableDictionary *fontDict = [NSMutableDictionary new]; @@ -164,7 +164,7 @@ NSDictionary *parseFontStruct(T fontStruct) } template -void setCommonGroupProps(T groupProps, RNSVGGroup *groupNode) +void setCommonGroupProps(const T &groupProps, RNSVGGroup *groupNode) { setCommonRenderableProps(groupProps, groupNode); @@ -183,7 +183,7 @@ void setCommonGroupProps(T groupProps, RNSVGGroup *groupNode) } template -void setCommonTextProps(T textProps, RNSVGText *textNode) +void setCommonTextProps(const T &textProps, RNSVGText *textNode) { setCommonGroupProps(textProps, textNode); textNode.deltaX = createLengthArrayFromStrings(textProps.dx);