diff options
author | Jason Wray <friedbunny@users.noreply.github.com> | 2018-04-16 19:17:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-16 19:17:37 -0400 |
commit | 3d3b87e020b727d38c56d0c9aa357cf8d4f14951 (patch) | |
tree | 9cbcad2fd736e65b6f7ee2f202329eba19ed6dd5 /platform/darwin/src/MGLOpenGLStyleLayer.h | |
parent | d4e597eb94a90a816fcc480fa7b6719430a20b84 (diff) | |
download | qtlocation-mapboxgl-3d3b87e020b727d38c56d0c9aa357cf8d4f14951.tar.gz |
[ios] Fix type narrowing issue with MGLOpenGLStyleLayer projection matrix (#11664)
`CATransform3D`'s matrix is internally typed as `CGFloat`, which we were implicitly casting to from `double`.... except that the `-Wc++11-narrowing` flag disallows implicit narrowing casts and we need `double` precision, anyway.
* [ios, macos] Use MGLMatrix4 a 4x4 double matrix for MGLOpenGLStyleLayer projection matrix.
* [ios, macos] Don't use union for MGLMatrix4
Diffstat (limited to 'platform/darwin/src/MGLOpenGLStyleLayer.h')
-rw-r--r-- | platform/darwin/src/MGLOpenGLStyleLayer.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/darwin/src/MGLOpenGLStyleLayer.h b/platform/darwin/src/MGLOpenGLStyleLayer.h index 50d226457f..df8d2c5365 100644 --- a/platform/darwin/src/MGLOpenGLStyleLayer.h +++ b/platform/darwin/src/MGLOpenGLStyleLayer.h @@ -5,6 +5,7 @@ #import "MGLFoundation.h" #import "MGLStyleValue.h" #import "MGLStyleLayer.h" +#import "MGLGeometry.h" NS_ASSUME_NONNULL_BEGIN @@ -18,7 +19,7 @@ typedef struct MGLStyleLayerDrawingContext { CLLocationDirection direction; CGFloat pitch; CGFloat fieldOfView; - CATransform3D projectionMatrix; + MGLMatrix4 projectionMatrix; } MGLStyleLayerDrawingContext; MGL_EXPORT |