From 1c1e8a860ba539baa5e997a5c2b7114ab4dfbbb3 Mon Sep 17 00:00:00 2001 From: Mikael Sand Date: Tue, 15 Aug 2017 15:44:10 +0300 Subject: [PATCH] Fix type warning. --- ios/RNSVGRenderable.h | 4 ++-- ios/RNSVGRenderable.m | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ios/RNSVGRenderable.h b/ios/RNSVGRenderable.h index 1d56871a..a66ea0b0 100644 --- a/ios/RNSVGRenderable.h +++ b/ios/RNSVGRenderable.h @@ -25,8 +25,8 @@ @property (nonatomic, assign) CGLineCap strokeLinecap; @property (nonatomic, assign) CGLineJoin strokeLinejoin; @property (nonatomic, assign) CGFloat strokeMiterlimit; -@property (nonatomic, assign) RNSVGCGFloatArray strokeDasharray; -@property (nonatomic, assign) NSArray *strokeDasharrayData; +@property (nonatomic, assign) RNSVGCGFloatArray strokeDasharrayData; +@property (nonatomic, assign) NSArray *strokeDasharray; @property (nonatomic, assign) CGFloat strokeDashoffset; @property (nonatomic, copy) NSArray *propList; diff --git a/ios/RNSVGRenderable.m b/ios/RNSVGRenderable.m index 4f6f0b4a..0ad89c79 100644 --- a/ios/RNSVGRenderable.m +++ b/ios/RNSVGRenderable.m @@ -110,24 +110,24 @@ - (void)setStrokeDasharray:(NSArray *)strokeDasharray { - if (strokeDasharray == _strokeDasharrayData) { + if (strokeDasharray == _strokeDasharray) { return; } - if (_strokeDasharray.array) { - free(_strokeDasharray.array); + if (_strokeDasharrayData.array) { + free(_strokeDasharrayData.array); } [self invalidate]; NSUInteger count = strokeDasharray.count; - _strokeDasharray.count = count; - _strokeDasharray.array = nil; + _strokeDasharrayData.count = count; + _strokeDasharrayData.array = nil; if (count) { - _strokeDasharray.array = malloc(sizeof(CGFloat) * count); + _strokeDasharrayData.array = malloc(sizeof(CGFloat) * count); for (NSUInteger i = 0; i < count; i++) { - _strokeDasharray.array[i] = [strokeDasharray[i] floatValue]; + _strokeDasharrayData.array[i] = [strokeDasharray[i] floatValue]; } } - _strokeDasharrayData = strokeDasharray; + _strokeDasharray = strokeDasharray; } - (void)setStrokeDashoffset:(CGFloat)strokeDashoffset @@ -152,8 +152,8 @@ - (void)dealloc { CGPathRelease(_hitArea); - if (_strokeDasharray.array) { - free(_strokeDasharray.array); + if (_strokeDasharrayData.array) { + free(_strokeDasharrayData.array); } } @@ -216,7 +216,7 @@ CGContextSetLineWidth(context, [self.strokeWidth floatValue]); CGContextSetLineCap(context, self.strokeLinecap); CGContextSetLineJoin(context, self.strokeLinejoin); - RNSVGCGFloatArray dash = self.strokeDasharray; + RNSVGCGFloatArray dash = self.strokeDasharrayData; if (dash.count) { CGContextSetLineDash(context, self.strokeDashoffset, dash.array, dash.count);