Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

fix #5983: ignore viewport no-ops #6060

Closed
wants to merge 15 commits into from
Closed

Conversation

incanus
Copy link
Contributor

@incanus incanus commented Aug 17, 2016

Work in progress towards fixing #5983. We may want to do some of this not just at the mobile bindings layer, but also in core for completeness.

/cc @1ec5 @friedbunny

@incanus incanus added iOS Mapbox Maps SDK for iOS performance Speed, stability, CPU usage, memory usage, or power usage Android Mapbox Maps SDK for Android labels Aug 17, 2016
@incanus incanus added this to the ios-v3.4.0 milestone Aug 17, 2016
@incanus incanus self-assigned this Aug 17, 2016
&& _centerCoordinate.longitude == otherCamera.centerCoordinate.longitude
&& _altitude == otherCamera.altitude
&& _pitch == otherCamera.pitch && _heading == otherCamera.heading);
NSAssert([otherCamera isKindOfClass:[self class]], @"must compare two cameras");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method takes an id, which implies you can pass in any object. Do other classes assert when you attempt to compare to something of a different class?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. 5fba4e6

@@ -34,6 +34,14 @@ NS_INLINE mbgl::LatLngBounds MGLLatLngBoundsFromCoordinateBounds(MGLCoordinateBo
MGLLatLngFromLocationCoordinate2D(coordinateBounds.ne));
}

NS_INLINE void MGLLocationCoordinatesFromCoordinateBounds(MGLCoordinateBounds coordinateBounds, CLLocationCoordinate2D *coordinates) {
assert(sizeof(coordinates) == 4 * sizeof(CLLocationCoordinate2D));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: use NSAssert.

Copy link
Contributor Author

@incanus incanus Aug 18, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried, but can't do that in NS_INLINE; it requires the existence of self.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad, you want NSCAssert, because we're in a C function that has no access to self.

@1ec5 1ec5 added ⚠️ DO NOT MERGE Work in progress, proof of concept, or on hold navigation For the Mapbox Navigation SDK for Android or iOS or navigation use cases in general labels Aug 21, 2016
@1ec5 1ec5 removed the Android Mapbox Maps SDK for Android label Dec 5, 2016
@1ec5
Copy link
Contributor

1ec5 commented Jan 24, 2017

Closing in favor of #7125, #7119, and #7724.

@1ec5 1ec5 closed this Jan 24, 2017
@friedbunny friedbunny deleted the 5983-ignore-viewport-noops branch March 28, 2017 23:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
⚠️ DO NOT MERGE Work in progress, proof of concept, or on hold iOS Mapbox Maps SDK for iOS navigation For the Mapbox Navigation SDK for Android or iOS or navigation use cases in general performance Speed, stability, CPU usage, memory usage, or power usage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants