diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-07-14 16:18:59 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-07-14 16:27:25 +0300 |
commit | 44406e91de97132e18494fb1d3353ce00726f192 (patch) | |
tree | 676f327f04eac880c93c480c4a91e5dcf3210d80 /platform/darwin | |
parent | 9ef30c23527ef0e8dfe4a7b486624a284ccc016a (diff) | |
download | qtlocation-mapboxgl-44406e91de97132e18494fb1d3353ce00726f192.tar.gz |
[ios,macos] Partially revert 06af75
Use static_cast<float> to convert from CGfloat when creating
PropertyValue<float> and avoid breaking backwards-compatibility.
Diffstat (limited to 'platform/darwin')
-rw-r--r-- | platform/darwin/src/MGLMultiPoint_Private.h | 4 | ||||
-rw-r--r-- | platform/darwin/src/MGLPolygon.mm | 2 | ||||
-rw-r--r-- | platform/darwin/src/MGLPolyline.mm | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/platform/darwin/src/MGLMultiPoint_Private.h b/platform/darwin/src/MGLMultiPoint_Private.h index 3da4c0bbb5..aa52a02fcb 100644 --- a/platform/darwin/src/MGLMultiPoint_Private.h +++ b/platform/darwin/src/MGLMultiPoint_Private.h @@ -30,7 +30,7 @@ NS_ASSUME_NONNULL_BEGIN @protocol MGLMultiPointDelegate <NSObject> /** Returns the fill alpha value for the given annotation. */ -- (float)alphaForShapeAnnotation:(MGLShape *)annotation; +- (double)alphaForShapeAnnotation:(MGLShape *)annotation; /** Returns the stroke color object for the given annotation. */ - (mbgl::Color)strokeColorForShapeAnnotation:(MGLShape *)annotation; @@ -39,7 +39,7 @@ NS_ASSUME_NONNULL_BEGIN - (mbgl::Color)fillColorForPolygonAnnotation:(MGLPolygon *)annotation; /** Returns the stroke width object for the given annotation. */ -- (float)lineWidthForPolylineAnnotation:(MGLPolyline *)annotation; +- (CGFloat)lineWidthForPolylineAnnotation:(MGLPolyline *)annotation; @end diff --git a/platform/darwin/src/MGLPolygon.mm b/platform/darwin/src/MGLPolygon.mm index 3829adf675..b8f02b6406 100644 --- a/platform/darwin/src/MGLPolygon.mm +++ b/platform/darwin/src/MGLPolygon.mm @@ -44,7 +44,7 @@ } mbgl::FillAnnotation annotation { geometry }; - annotation.opacity = { [delegate alphaForShapeAnnotation:self] }; + annotation.opacity = { static_cast<float>([delegate alphaForShapeAnnotation:self]) }; annotation.outlineColor = { [delegate strokeColorForShapeAnnotation:self] }; annotation.color = { [delegate fillColorForPolygonAnnotation:self] }; diff --git a/platform/darwin/src/MGLPolyline.mm b/platform/darwin/src/MGLPolyline.mm index 9f6f6c3542..b81147a3ba 100644 --- a/platform/darwin/src/MGLPolyline.mm +++ b/platform/darwin/src/MGLPolyline.mm @@ -24,9 +24,9 @@ } mbgl::LineAnnotation annotation { geometry }; - annotation.opacity = { [delegate alphaForShapeAnnotation:self] }; + annotation.opacity = { static_cast<float>([delegate alphaForShapeAnnotation:self]) }; annotation.color = { [delegate strokeColorForShapeAnnotation:self] }; - annotation.width = { [delegate lineWidthForPolylineAnnotation:self] }; + annotation.width = { static_cast<float>([delegate lineWidthForPolylineAnnotation:self]) }; return annotation; } |