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

fix #5983: ignore viewport no-ops - #6060

Closed
incanus wants to merge 15 commits into
masterfrom
5983-ignore-viewport-noops
Closed

incanus wants to merge 15 commits into
masterfrom
5983-ignore-viewport-noops

Conversation

@incanus

@incanus incanus commented Aug 17, 2016

Copy link
Copy Markdown
Contributor

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
Comment thread platform/darwin/src/MGLMapCamera.mm Outdated
&& _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
Copy Markdown
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
Copy Markdown
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

}

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: use NSAssert.

@incanus incanus Aug 18, 2016 •

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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

1ec5 commented Jan 24, 2017

Copy link
Copy Markdown
Contributor

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